Commits

Sebastian Wiesner committed c593d7d

Add space only, if extra arguments were given

  • Participants
  • Parent commits 5cb154c

Comments (0)

Files changed (1)

File programoutput/sphinxcontrib/programoutput.py

         extra_args = node.get('extraargs', '').encode(
             sys.getfilesystemencoding())
         if node['use_shell']:
-            cmd = cmd_bytes + ' ' + extra_args
+            cmd = cmd_bytes
+            if extra_args:
+                cmd += ' ' + extra_args
         else:
             cmd = shlex.split(cmd_bytes)
             if extra_args: