]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#3045: fix pydoc behavior for TEMP path with spaces.
authorGeorg Brandl <georg@python.org>
Wed, 16 Jul 2008 21:19:28 +0000 (21:19 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 16 Jul 2008 21:19:28 +0000 (21:19 +0000)
Lib/pydoc.py

index 2035f7889ee4c19e17cb22a08a289cf7282543f7..7681a3206a62e342487ed2420e44d7a0d8aa36e6 100755 (executable)
@@ -1333,7 +1333,7 @@ def getpager():
     (fd, filename) = tempfile.mkstemp()
     os.close(fd)
     try:
-        if hasattr(os, 'system') and os.system('more %s' % filename) == 0:
+        if hasattr(os, 'system') and os.system('more "%s"' % filename) == 0:
             return lambda text: pipepager(text, 'more')
         else:
             return ttypager
@@ -1361,7 +1361,7 @@ def tempfilepager(text, cmd):
     file.write(text)
     file.close()
     try:
-        os.system(cmd + ' ' + filename)
+        os.system(cmd + ' "' + filename + '"')
     finally:
         os.unlink(filename)