##// END OF EJS Templates
Merge pull request #9079 from Carreau/cleanup-2...
Min RK -
r21855:6fcf4189 merge
parent child Browse files
Show More
@@ -1459,7 +1459,6 b' class InteractiveShell(SingletonConfigurable):'
1459 not py3compat.isidentifier(oname, dotted=True):
1459 not py3compat.isidentifier(oname, dotted=True):
1460 return dict(found=False)
1460 return dict(found=False)
1461
1461
1462 alias_ns = None
1463 if namespaces is None:
1462 if namespaces is None:
1464 # Namespaces to search in:
1463 # Namespaces to search in:
1465 # Put them in a list. The order is important so that we
1464 # Put them in a list. The order is important so that we
@@ -1470,7 +1469,7 b' class InteractiveShell(SingletonConfigurable):'
1470 ]
1469 ]
1471
1470
1472 # initialize results to 'null'
1471 # initialize results to 'null'
1473 found = False; obj = None; ospace = None; ds = None
1472 found = False; obj = None; ospace = None;
1474 ismagic = False; isalias = False; parent = None
1473 ismagic = False; isalias = False; parent = None
1475
1474
1476 # We need to special-case 'print', which as of python2.6 registers as a
1475 # We need to special-case 'print', which as of python2.6 registers as a
@@ -2647,7 +2646,7 b' class InteractiveShell(SingletonConfigurable):'
2647
2646
2648 # Make sure we can open the file
2647 # Make sure we can open the file
2649 try:
2648 try:
2650 with open(fname) as thefile:
2649 with open(fname):
2651 pass
2650 pass
2652 except:
2651 except:
2653 warn('Could not open file <%s> for safe execution.' % fname)
2652 warn('Could not open file <%s> for safe execution.' % fname)
@@ -2705,7 +2704,7 b' class InteractiveShell(SingletonConfigurable):'
2705
2704
2706 # Make sure we can open the file
2705 # Make sure we can open the file
2707 try:
2706 try:
2708 with open(fname) as thefile:
2707 with open(fname):
2709 pass
2708 pass
2710 except:
2709 except:
2711 warn('Could not open file <%s> for safe execution.' % fname)
2710 warn('Could not open file <%s> for safe execution.' % fname)
@@ -2991,8 +2990,6 b' class InteractiveShell(SingletonConfigurable):'
2991 else:
2990 else:
2992 raise ValueError("Interactivity was %r" % interactivity)
2991 raise ValueError("Interactivity was %r" % interactivity)
2993
2992
2994 exec_count = self.execution_count
2995
2996 try:
2993 try:
2997 for i, node in enumerate(to_run_exec):
2994 for i, node in enumerate(to_run_exec):
2998 mod = ast.Module([node])
2995 mod = ast.Module([node])
General Comments 0
You need to be logged in to leave comments. Login now