3v324v23 commited on
Commit
984c7e9
1 Parent(s): 86b654d

修正自动更新路径

Browse files
Files changed (1) hide show
  1. check_proxy.py +5 -1
check_proxy.py CHANGED
@@ -67,7 +67,11 @@ def patch_and_restart(path):
67
  print亮黄('由于您没有设置config_private.py私密配置,现将您的现有配置移动至config_private.py以防止配置丢失,',
68
  '另外您可以随时在history子文件夹下找回旧版的程序。')
69
  shutil.copyfile('config.py', 'config_private.py')
70
- distutils.dir_util.copy_tree(path+'/chatgpt_academic-master', './')
 
 
 
 
71
  import subprocess
72
  print亮绿('代码已经更新,即将更新pip包依赖……')
73
  for i in reversed(range(5)): time.sleep(1); print(i)
 
67
  print亮黄('由于您没有设置config_private.py私密配置,现将您的现有配置移动至config_private.py以防止配置丢失,',
68
  '另外您可以随时在history子文件夹下找回旧版的程序。')
69
  shutil.copyfile('config.py', 'config_private.py')
70
+ try:
71
+ distutils.dir_util.copy_tree(path+'/gpt_academic-master', './')
72
+ except:
73
+ from distutils import dir_util
74
+ dir_util.copy_tree(path+'/gpt_academic-master', './')
75
  import subprocess
76
  print亮绿('代码已经更新,即将更新pip包依赖……')
77
  for i in reversed(range(5)): time.sleep(1); print(i)