We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d31d46 commit 7c274feCopy full SHA for 7c274fe
bpython/repl.py
@@ -594,15 +594,14 @@ def get_source_of_current_name(self):
594
current name in the current input line. Throw `SourceNotFound` if the
595
source cannot be found."""
596
obj = self.current_func
597
- msg = "Unexpected error retrieving source code for %s" % (obj,)
598
try:
599
if obj is None:
600
line = self.current_line
601
if not line.strip():
602
raise SourceNotFound("Nothing to get source of")
603
if inspection.is_eval_safe_name(line):
604
obj = self.get_object(line)
605
- return inspect.getsource(obj)
+ return inspect.getsource(obj)
606
except (AttributeError, NameError), e:
607
msg = "Cannot get source: " + str(e)
608
except IOError, e:
0 commit comments