JerryZhouYG commited on
Commit
9f8e9df
·
verified ·
1 Parent(s): 0e24ed6

Update check_proxy.py

Browse files
Files changed (1) hide show
  1. check_proxy.py +9 -14
check_proxy.py CHANGED
@@ -127,20 +127,15 @@ def auto_update(raise_error=False):
127
  from colorful import print亮黄
128
  print亮黄(f'\n新版本可用。新版本:{remote_version},当前版本:{current_version}。{new_feature}')
129
  print('(1)Github更新地址:\nhttps://github.com/binary-husky/chatgpt_academic\n')
130
- user_instruction = input('(2)是否一键更新代码(Y+回车=确认,输入其他/无输入+回车=不更新)?')
131
- if user_instruction in ['Y', 'y']:
132
- path = backup_and_download(current_version, remote_version)
133
- try:
134
- patch_and_restart(path)
135
- except:
136
- msg = '更新失败。'
137
- if raise_error:
138
- from toolbox import trimmed_format_exc
139
- msg += trimmed_format_exc()
140
- print(msg)
141
- else:
142
- print('自动更新程序:已禁用')
143
- return
144
  else:
145
  return
146
  except:
 
127
  from colorful import print亮黄
128
  print亮黄(f'\n新版本可用。新版本:{remote_version},当前版本:{current_version}。{new_feature}')
129
  print('(1)Github更新地址:\nhttps://github.com/binary-husky/chatgpt_academic\n')
130
+ path = backup_and_download(current_version, remote_version)
131
+ try:
132
+ patch_and_restart(path)
133
+ except:
134
+ msg = '更新失败。'
135
+ if raise_error:
136
+ from toolbox import trimmed_format_exc
137
+ msg += trimmed_format_exc()
138
+ print(msg)
 
 
 
 
 
139
  else:
140
  return
141
  except: