Index: Lib/bdb.py =================================================================== --- Lib/bdb.py (wersja 45527) +++ Lib/bdb.py (kopia robocza) @@ -352,6 +352,9 @@ # a debugger to debug a statement, given as a string. def run(self, cmd, globals=None, locals=None): + if not isinstance(cmd, str): + print 'The first argument must be a string' + return if globals is None: import __main__ globals = __main__.__dict__ @@ -371,6 +374,9 @@ sys.settrace(None) def runeval(self, expr, globals=None, locals=None): + if not isinstance(cmd, str): + print 'The first argument must be a string' + return if globals is None: import __main__ globals = __main__.__dict__