Qilan2 commited on
Commit
dbe351f
·
verified ·
1 Parent(s): 7555313

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +6 -1
server.py CHANGED
@@ -297,7 +297,12 @@ def check_api1():
297
  print("接口返回信息:", response_json)
298
  if "token" in response_json:
299
  print("检测到 token")
300
- subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{frp_url}:/sillytavern/ /sillytavern/", shell=True, check=True)
 
 
 
 
 
301
  # break # 跳出循环
302
  else:
303
  print("接口返回信息:", response_json)
 
297
  print("接口返回信息:", response_json)
298
  if "token" in response_json:
299
  print("检测到 token")
300
+ try:
301
+ subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{frp_url}:/sillytavern/ /sillytavern/", shell=True, check=True)
302
+ except subprocess.CalledProcessError as e:
303
+ print(f"Rsync failed with return code: {e.returncode}")
304
+ print(f"Command output: {e.output}")
305
+ # subprocess.run(f"rsync -avz -e 'ssh -p {ssh_port} -o StrictHostKeyChecking=no' root@{frp_url}:/sillytavern/ /sillytavern/", shell=True, check=True)
306
  # break # 跳出循环
307
  else:
308
  print("接口返回信息:", response_json)