##// END OF EJS Templates
Add more exceptions
palewire -
Show More
@@ -680,9 +680,8 b' class ExecutionMagics(Magics):'
680 680 fpath = arg_lst[0]
681 681 filename = file_finder(fpath)
682 682 except IndexError:
683 warn('you must provide at least a filename.')
684 print('\n%run:\n', oinspect.getdoc(self.run))
685 return
683 msg = 'you must provide at least a filename.'
684 raise Exception(msg)
686 685 except IOError as e:
687 686 try:
688 687 msg = str(e)
@@ -690,8 +689,7 b' class ExecutionMagics(Magics):'
690 689 msg = e.message
691 690 if os.name == 'nt' and re.match(r"^'.*'$",fpath):
692 691 warn('For Windows, use double quotes to wrap a filename: %run "mypath\\myfile.py"')
693 error(msg)
694 return
692 raise Exception(msg)
695 693 except TypeError:
696 694 if fpath in sys.meta_path:
697 695 filename = ""
General Comments 0
You need to be logged in to leave comments. Login now