diff Lib/code.py @ 86331:2933598a7802

Closes #17730: in code.interact(), when banner="", do not print anything. Also adds tests for banner printing.
author Georg Brandl <georg@python.org>
date Sun, 13 Oct 2013 21:49:06 +0200
parents 7769c4d72806
children
line wrap: on
line diff
--- a/Lib/code.py	Sun Oct 13 20:56:25 2013 +0200
+++ b/Lib/code.py	Sun Oct 13 21:49:06 2013 +0200
@@ -216,7 +216,7 @@
             self.write("Python %s on %s\n%s\n(%s)\n" %
                        (sys.version, sys.platform, cprt,
                         self.__class__.__name__))
-        else:
+        elif banner:
             self.write("%s\n" % str(banner))
         more = 0
         while 1: