Sfoglia il codice sorgente

Ignore error when removing user script

Gabriel-Adrian Samfira 6 anni fa
parent
commit
582b0cc91f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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
     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
     while True:
         data = content[idx:idx+2048]