##// END OF EJS Templates
Same in profileapp.py , profiledir.py, shellapp.py
Pierre Gerold -
Show More
@@ -252,7 +252,7 b' class ProfileCreate(BaseIPythonApplication):'
252 except ImportError:
252 except ImportError:
253 self.log.info("Couldn't import %s, config file will be excluded", name)
253 self.log.info("Couldn't import %s, config file will be excluded", name)
254 except Exception:
254 except Exception:
255 self.log.warn('Unexpected error importing %s', name, exc_info=True)
255 self.log.warning('Unexpected error importing %s', name, exc_info=True)
256 return app
256 return app
257
257
258 def init_config_files(self):
258 def init_config_files(self):
@@ -87,7 +87,7 b' class ProfileDir(LoggingConfigurable):'
87 try:
87 try:
88 os.chmod(path, mode)
88 os.chmod(path, mode)
89 except OSError:
89 except OSError:
90 self.log.warn(
90 self.log.warning(
91 "Could not set permissions on %s",
91 "Could not set permissions on %s",
92 path
92 path
93 )
93 )
@@ -231,11 +231,11 b' class InteractiveShellApp(Configurable):'
231 try:
231 try:
232 r = enable(key)
232 r = enable(key)
233 except ImportError:
233 except ImportError:
234 self.log.warn("Eventloop or matplotlib integration failed. Is matplotlib installed?")
234 self.log.warning("Eventloop or matplotlib integration failed. Is matplotlib installed?")
235 self.shell.showtraceback()
235 self.shell.showtraceback()
236 return
236 return
237 except Exception:
237 except Exception:
238 self.log.warn("GUI event loop or pylab initialization failed")
238 self.log.warning("GUI event loop or pylab initialization failed")
239 self.shell.showtraceback()
239 self.shell.showtraceback()
240 return
240 return
241
241
@@ -273,11 +273,11 b' class InteractiveShellApp(Configurable):'
273 ext=ext,
273 ext=ext,
274 location=self.profile_dir.location
274 location=self.profile_dir.location
275 ))
275 ))
276 self.log.warn(msg, exc_info=True)
276 self.log.warning(msg, exc_info=True)
277 except:
277 except:
278 if self.reraise_ipython_extension_failures:
278 if self.reraise_ipython_extension_failures:
279 raise
279 raise
280 self.log.warn("Unknown error in loading extensions:", exc_info=True)
280 self.log.warning("Unknown error in loading extensions:", exc_info=True)
281
281
282 def init_code(self):
282 def init_code(self):
283 """run the pre-flight code, specified via exec_lines"""
283 """run the pre-flight code, specified via exec_lines"""
@@ -310,18 +310,18 b' class InteractiveShellApp(Configurable):'
310 line)
310 line)
311 self.shell.run_cell(line, store_history=False)
311 self.shell.run_cell(line, store_history=False)
312 except:
312 except:
313 self.log.warn("Error in executing line in user "
313 self.log.warning("Error in executing line in user "
314 "namespace: %s" % line)
314 "namespace: %s" % line)
315 self.shell.showtraceback()
315 self.shell.showtraceback()
316 except:
316 except:
317 self.log.warn("Unknown error in handling IPythonApp.exec_lines:")
317 self.log.warning("Unknown error in handling IPythonApp.exec_lines:")
318 self.shell.showtraceback()
318 self.shell.showtraceback()
319
319
320 def _exec_file(self, fname, shell_futures=False):
320 def _exec_file(self, fname, shell_futures=False):
321 try:
321 try:
322 full_filename = filefind(fname, [u'.', self.ipython_dir])
322 full_filename = filefind(fname, [u'.', self.ipython_dir])
323 except IOError as e:
323 except IOError as e:
324 self.log.warn("File not found: %r"%fname)
324 self.log.warning("File not found: %r"%fname)
325 return
325 return
326 # Make sure that the running script gets a proper sys.argv as if it
326 # Make sure that the running script gets a proper sys.argv as if it
327 # were run from a system shell.
327 # were run from a system shell.
@@ -362,7 +362,7 b' class InteractiveShellApp(Configurable):'
362 try:
362 try:
363 self._exec_file(python_startup)
363 self._exec_file(python_startup)
364 except:
364 except:
365 self.log.warn("Unknown error in handling PYTHONSTARTUP file %s:", python_startup)
365 self.log.warning("Unknown error in handling PYTHONSTARTUP file %s:", python_startup)
366 self.shell.showtraceback()
366 self.shell.showtraceback()
367 finally:
367 finally:
368 # Many PYTHONSTARTUP files set up the readline completions,
368 # Many PYTHONSTARTUP files set up the readline completions,
@@ -381,7 +381,7 b' class InteractiveShellApp(Configurable):'
381 for fname in sorted(startup_files):
381 for fname in sorted(startup_files):
382 self._exec_file(fname)
382 self._exec_file(fname)
383 except:
383 except:
384 self.log.warn("Unknown error in handling startup files:")
384 self.log.warning("Unknown error in handling startup files:")
385 self.shell.showtraceback()
385 self.shell.showtraceback()
386
386
387 def _run_exec_files(self):
387 def _run_exec_files(self):
@@ -394,7 +394,7 b' class InteractiveShellApp(Configurable):'
394 for fname in self.exec_files:
394 for fname in self.exec_files:
395 self._exec_file(fname)
395 self._exec_file(fname)
396 except:
396 except:
397 self.log.warn("Unknown error in handling IPythonApp.exec_files:")
397 self.log.warning("Unknown error in handling IPythonApp.exec_files:")
398 self.shell.showtraceback()
398 self.shell.showtraceback()
399
399
400 def _run_cmd_line_code(self):
400 def _run_cmd_line_code(self):
@@ -406,7 +406,7 b' class InteractiveShellApp(Configurable):'
406 line)
406 line)
407 self.shell.run_cell(line, store_history=False)
407 self.shell.run_cell(line, store_history=False)
408 except:
408 except:
409 self.log.warn("Error in executing line in user namespace: %s" %
409 self.log.warning("Error in executing line in user namespace: %s" %
410 line)
410 line)
411 self.shell.showtraceback()
411 self.shell.showtraceback()
412
412
General Comments 0
You need to be logged in to leave comments. Login now