##// END OF EJS Templates
informative error when trying to load directories...
Paul Ivanov -
Show More
@@ -3015,6 +3015,8 b' class InteractiveShell(SingletonConfigurable):'
3015 with io_open(tgt,'r', encoding='latin1') as f :
3015 with io_open(tgt,'r', encoding='latin1') as f :
3016 return f.read()
3016 return f.read()
3017 raise ValueError(("'%s' seem to be unreadable.") % target)
3017 raise ValueError(("'%s' seem to be unreadable.") % target)
3018 elif os.path.isdir(os.path.expanduser(tgt)):
3019 raise ValueError("'%s' is a directory, not a regular file." % target)
3018
3020
3019 try: # User namespace
3021 try: # User namespace
3020 codeobj = eval(target, self.user_ns)
3022 codeobj = eval(target, self.user_ns)
General Comments 0
You need to be logged in to leave comments. Login now