##// END OF EJS Templates
Fix uncaught ValueError in rerun magic int conversion
nicolaslazo -
Show More
@@ -299,7 +299,11 b' class HistoryMagics(Magics):'
299 """
299 """
300 opts, args = self.parse_options(parameter_s, 'l:g:', mode='string')
300 opts, args = self.parse_options(parameter_s, 'l:g:', mode='string')
301 if "l" in opts: # Last n lines
301 if "l" in opts: # Last n lines
302 n = int(opts['l'])
302 try:
303 n = int(opts["l"])
304 except ValueError:
305 print("Number of lines must be an integer")
306 return
303
307
304 if n == 0:
308 if n == 0:
305 print("Requested 0 last lines - nothing to run")
309 print("Requested 0 last lines - nothing to run")
General Comments 0
You need to be logged in to leave comments. Login now