From fcc7a4cf9bc43af75fe91585d9129d7d03ecd536 Mon Sep 17 00:00:00 2001 From: Falseen Date: Sun, 1 Nov 2015 20:35:01 +0800 Subject: [PATCH] remove os.chdir(file_path) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit os.chdir(file_path) 会导致测试代码无法找到引用的包,暂时先移除。 --- shadowsocks/asyncdns.py | 1 - shadowsocks/local.py | 1 - shadowsocks/server.py | 1 - 3 files changed, 3 deletions(-) diff --git a/shadowsocks/asyncdns.py b/shadowsocks/asyncdns.py index d958752..dd32902 100644 --- a/shadowsocks/asyncdns.py +++ b/shadowsocks/asyncdns.py @@ -28,7 +28,6 @@ if __name__ == '__main__': import sys import inspect file_path = os.path.dirname(os.path.realpath(inspect.getfile(inspect.currentframe()))) - os.chdir(file_path) sys.path.insert(0, os.path.join(file_path, '../')) from shadowsocks import common, lru_cache, eventloop, shell diff --git a/shadowsocks/local.py b/shadowsocks/local.py index 096283c..68edd6f 100755 --- a/shadowsocks/local.py +++ b/shadowsocks/local.py @@ -26,7 +26,6 @@ import signal if __name__ == '__main__': import inspect file_path = os.path.dirname(os.path.realpath(inspect.getfile(inspect.currentframe()))) - os.chdir(file_path) sys.path.insert(0, os.path.join(file_path, '../')) from shadowsocks import shell, daemon, eventloop, tcprelay, udprelay, asyncdns diff --git a/shadowsocks/server.py b/shadowsocks/server.py index 235a3f2..14ff930 100755 --- a/shadowsocks/server.py +++ b/shadowsocks/server.py @@ -26,7 +26,6 @@ import signal if __name__ == '__main__': import inspect file_path = os.path.dirname(os.path.realpath(inspect.getfile(inspect.currentframe()))) - os.chdir(file_path) sys.path.insert(0, os.path.join(file_path, '../')) from shadowsocks import shell, daemon, eventloop, tcprelay, udprelay, \