# HG changeset patch # User Peter Sanchez # Date 1541014993 25200 # Wed Oct 31 12:43:13 2018 -0700 # Node ID a62a8272b2e5f6f8ede460e8333f9ca32df512a7 # Parent b8c7c81dca371b9d151da9b6eab9d6d5cb9fc39d Updating quoting for password characters diff --git a/djeploy/system.py b/djeploy/system.py --- a/djeploy/system.py +++ b/djeploy/system.py @@ -7,7 +7,7 @@ def set_environment(variable, value): set_env_cmd = 'setenv' if 'csh' in env.shell.split()[0] else 'export' extra = ' ' if set_env_cmd == 'setenv' else '=' - return '%s %s%s\'%s\' && ' % (set_env_cmd, variable, extra, value) + return '%s %s%s"%s" && ' % (set_env_cmd, variable, extra, value) def get_user_home(name): @@ -104,11 +104,11 @@ @task def check_command_output(cmd, pattern, use_sudo=False, **kwargs): - ''' Check the output of a command (cmd) using regular expression - defined in pattern. Pattern can be a list of several regexp + ''' Check the output of a command (cmd) using regular expression + defined in pattern. Pattern can be a list of several regexp patterns and each one will be validated. - If all pass, then None is returned. Otherwise, the output + If all pass, then None is returned. Otherwise, the output with the unmatched pattern is given in a tuple format. ''' use_command = 'sudo' if use_sudo else 'run'