Browse Source

Ignore error when removing user script

Gabriel-Adrian Samfira 6 năm trước cách đây
mục cha
commit
582b0cc91f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      coriolis/utils.py

+ 1 - 1
coriolis/utils.py

@@ -209,7 +209,7 @@ def write_winrm_file(conn, remote_path, content):
     """This is a poor man's scp command that transfers small
     """This is a poor man's scp command that transfers small
     files, in chunks, over WinRM.
     files, in chunks, over WinRM.
     """
     """
-    conn.exec_ps_command("rm -Force %s" % remote_path)
+    conn.exec_ps_command("rm -Force -ErrorAction SilentlyContinue %s" % remote_path)
     idx = 0
     idx = 0
     while True:
     while True:
         data = content[idx:idx+2048]
         data = content[idx:idx+2048]