Skip to content

Commit af0cbd9

Browse files
committed
Fix review comments
1 parent 07368e5 commit af0cbd9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

litsupport/modules/timeit.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def _mutateCommandLine(context, commandline):
5656
args += ["--redirect-input", stdin]
5757
cmd.stdin = None
5858
else:
59-
args += ["--redirect-input", "/dev/null"] if os.name != 'nt' else []
59+
if os.name != 'nt':
60+
args += ["--redirect-input", "/dev/null"]
6061
if workdir is not None:
6162
args += ["--chdir", workdir]
6263
cmd.workdir = None

litsupport/shellcommand.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ def parse(commandline):
8888
and will throw an exception if the commandline uses unsupported features.
8989
"""
9090
result = ShellCommand()
91-
commandline = commandline.replace("\\", "/") if os.name == 'nt' else commandline
91+
if os.name == 'nt':
92+
commandline = commandline.replace("\\", "/")
9293
tokens = shlex.split(commandline)
9394
i = 0
9495
first_word = True

0 commit comments

Comments
 (0)