Avoid re-assigning command variable, for clarity

This commit is contained in:
Jesse Weinstein 2016-01-02 23:23:36 -08:00
parent 7d5693f2d3
commit 25c31a75d9

View file

@ -779,16 +779,17 @@ def interactive_open(targets, command):
if command:
# Split the command string into its arguments.
try:
command = shlex_split(command)
args = shlex_split(command)
except ValueError: # Malformed shell tokens.
command = [command]
args = [command]
else:
command = [open_anything()]
command.insert(0, command[0]) # for argv[0]
args = [open_anything()]
command += targets
args.insert(0, args[0]) # for argv[0]
return os.execlp(*command)
args += targets
return os.execlp(*args)
def _windows_long_path_name(short_path):