Skip to content

Commit

Permalink
修复命令行参数数组越界问题
Browse files Browse the repository at this point in the history
  • Loading branch information
aoaostar committed Jul 20, 2021
1 parent 63437bb commit dd355e4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,16 @@ def init_config(self):
raise e

def init_command_line_parameter(self):
unset_keys = []

for k in range(len(sys.argv)):
if sys.argv[k] == '--resident' or sys.argv[k] == '-r':
DATA['config']['RESIDENT'] = True
del sys.argv[k]
unset_keys.append(k)

for v in unset_keys:
del sys.argv[v]

# 命令分配
if len(sys.argv) == 3:
# 网盘保存路径
Expand Down

0 comments on commit dd355e4

Please sign in to comment.