X Tutup
Skip to content

Commit 2ce4a87

Browse files
committed
Minor cosmetic changes.
1 parent 86fb570 commit 2ce4a87

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

bpython/autocomplete.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@ def safe_eval(expr, namespace):
341341
try:
342342
obj = eval(expr, namespace)
343343
return obj
344-
except (NameError, AttributeError, SyntaxError) as e:
344+
except (NameError, AttributeError, SyntaxError):
345345
# If debugging safe_eval, raise this!
346-
# raise e
346+
# raise
347347
return SafeEvalFailed
348348

349349
def attr_matches(text, namespace, autocomplete_mode):

bpython/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ def p_key(self, key):
975975
page(source)
976976
except (ValueError, AttributeError, IOError, TypeError), e:
977977
self.statusbar.message(_(e))
978-
except (NameError), e:
978+
except NameError, e:
979979
self.statusbar.message(_('Cannot get source: %s' % e))
980980
return ''
981981

bpython/curtsiesfrontend/repl.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,9 @@ def new_import(name, globals={}, locals={}, fromlist=[], level=-1):
349349
if name in old_module_locations:
350350
loc = old_module_locations[name]
351351
if self.watching_files:
352-
self.watcher.add_module(old_module_locations[name])
352+
self.watcher.add_module(loc)
353353
else:
354-
self.watcher.add_module_later(old_module_locations[name])
354+
self.watcher.add_module_later(loc)
355355
raise
356356
else:
357357
if hasattr(m, "__file__"):
@@ -1308,9 +1308,9 @@ def show_source(self):
13081308
self.pager(source)
13091309
except (ValueError, AttributeError, IOError, TypeError), e:
13101310
self.status_bar.message(_(e))
1311-
except (NameError), e:
1311+
except NameError, e:
13121312
self.status_bar.message(_('Cannot get source: %s' % e))
1313-
1313+
13141314
def help_text(self):
13151315
return (self.version_help_text() + '\n' + self.key_help_text()).encode('utf8')
13161316

0 commit comments

Comments
 (0)
X Tutup