mirror of
https://github.com/beetbox/beets.git
synced 2025-12-25 18:13:17 +01:00
Avoid re-assigning command variable, for clarity
This commit is contained in:
parent
7d5693f2d3
commit
25c31a75d9
1 changed files with 7 additions and 6 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue