Browse Source

remove os.chdir(file_path)

os.chdir(file_path) 会导致测试代码无法找到引用的包,暂时先移除。
dev
Falseen 9 years ago
parent
commit
fcc7a4cf9b
  1. 1
      shadowsocks/asyncdns.py
  2. 1
      shadowsocks/local.py
  3. 1
      shadowsocks/server.py

1
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

1
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

1
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, \

Loading…
Cancel
Save