##// END OF EJS Templates
Rename env variable.
Matthias Bussonnier -
Show More
@@ -43,16 +43,16 b' else:'
43 "/etc/ipython",
43 "/etc/ipython",
44 ]
44 ]
45
45
46 _envvar = os.environ.get('IPYTHON_SUPPRESS_ERRORS')
46 _envvar = os.environ.get('IPYTHON_SUPPRESS_CONFIG_ERRORS')
47 if _envvar in {None, ''}:
47 if _envvar in {None, ''}:
48 IPYTHON_SUPPRESS_ERRORS = None
48 IPYTHON_SUPPRESS_CONFIG_ERRORS = None
49 else:
49 else:
50 if _envvar.lower() in {'1','true'}:
50 if _envvar.lower() in {'1','true'}:
51 IPYTHON_SUPPRESS_ERRORS = True
51 IPYTHON_SUPPRESS_CONFIG_ERRORS = True
52 elif _envvar.lower() in {'0','false'} :
52 elif _envvar.lower() in {'0','false'} :
53 IPYTHON_SUPPRESS_ERRORS = False
53 IPYTHON_SUPPRESS_CONFIG_ERRORS = False
54 else:
54 else:
55 sys.exit("Unsupported value for environment variable: 'IPYTHON_SUPPRESS_ERRORS' is set to '%s' which is none of {'0', '1', 'false', 'true', ''}."% _envvar )
55 sys.exit("Unsupported value for environment variable: 'IPYTHON_SUPPRESS_CONFIG_ERRORS' is set to '%s' which is none of {'0', '1', 'false', 'true', ''}."% _envvar )
56
56
57 # aliases and flags
57 # aliases and flags
58
58
@@ -282,7 +282,7 b' class BaseIPythonApplication(Application):'
282 self.log.error("couldn't create path %s: %s", path, e)
282 self.log.error("couldn't create path %s: %s", path, e)
283 self.log.debug("IPYTHONDIR set to: %s" % new)
283 self.log.debug("IPYTHONDIR set to: %s" % new)
284
284
285 def load_config_file(self, suppress_errors=IPYTHON_SUPPRESS_ERRORS):
285 def load_config_file(self, suppress_errors=IPYTHON_SUPPRESS_CONFIG_ERRORS):
286 """Load the config file.
286 """Load the config file.
287
287
288 By default, errors in loading config are handled, and a warning
288 By default, errors in loading config are handled, and a warning
@@ -293,9 +293,9 b' class BaseIPythonApplication(Application):'
293 behavior default to the one of `traitlets.Application`.
293 behavior default to the one of `traitlets.Application`.
294
294
295 The default value can be set :
295 The default value can be set :
296 - to `False` by setting 'IPYTHON_SUPPRESS_ERRORS' environment variable to '0', or 'false' (case insensitive).
296 - to `False` by setting 'IPYTHON_SUPPRESS_CONFIG_ERRORS' environment variable to '0', or 'false' (case insensitive).
297 - to `True` by setting 'IPYTHON_SUPPRESS_ERRORS' environment variable to '1' or 'true' (case insensitive).
297 - to `True` by setting 'IPYTHON_SUPPRESS_CONFIG_ERRORS' environment variable to '1' or 'true' (case insensitive).
298 - to `None` by setting 'IPYTHON_SUPPRESS_ERRORS' environment variable to '' (empty string) or leaving it unset.
298 - to `None` by setting 'IPYTHON_SUPPRESS_CONFIG_ERRORS' environment variable to '' (empty string) or leaving it unset.
299
299
300 Any other value are invalid, and will make IPython exit with a non-zero return code.
300 Any other value are invalid, and will make IPython exit with a non-zero return code.
301 """
301 """
General Comments 0
You need to be logged in to leave comments. Login now