Browse code

Fix logic error in command_on_url

This prevented the deletion of cached streams on the remote side

Lorenz Hüdepohl authored on 08/11/2017 18:14:56
Showing 1 changed files
... ...
@@ -155,14 +155,16 @@ def command_on_url(*commands, abort=True, dry_run=False, echo=False):
155 155
             print(*ssh, '"' + " ".join(commands + [filename]) + '"')
156 156
         else:
157 157
             print(*commands, filename)
158
-        return True
159
-    elif not dry_run:
158
+
159
+    if not dry_run:
160 160
         cmd = run(ssh + commands + [filename])
161 161
         if abort:
162 162
             check_returncode(cmd)
163 163
         else:
164 164
             return cmd.returncode == 0
165 165
 
166
+    return True
167
+
166 168
 def exists(url):
167 169
     return command_on_url("test", "-f", url, abort=False, dry_run=False, echo=False)
168 170