##// END OF EJS Templates
use tuple in str.endwith
Matthias BUSSONNIER -
Show More
@@ -70,7 +70,7 b' class CodeMagics(Magics):'
70 70 raw = 'r' in opts
71 71 ext = u'.ipy' if raw else u'.py'
72 72 fname, codefrom = unquote_filename(args[0]), " ".join(args[1:])
73 if not (fname.endswith(u'.py') or fname.endswith(u'.ipy')):
73 if not fname.endswith((u'.py',u'.ipy')):
74 74 fname += ext
75 75 if os.path.isfile(fname):
76 76 overwrite = self.shell.ask_yes_no('File `%s` exists. Overwrite (y/[N])? ' % fname, default='n')
General Comments 0
You need to be logged in to leave comments. Login now