From 6f443c45698809772cb44b64d98bd79278b5591c 2013-08-11 20:54:44 From: Paul Ivanov Date: 2013-08-11 20:54:44 Subject: [PATCH] use get, for when DISPLAY variable isn't defined --- diff --git a/IPython/testing/decorators.py b/IPython/testing/decorators.py index 9c3284f..8763002 100644 --- a/IPython/testing/decorators.py +++ b/IPython/testing/decorators.py @@ -330,7 +330,7 @@ skip_if_not_osx = skipif(sys.platform != 'darwin', _x11_skip_cond = (sys.platform not in ('darwin', 'win32') and - os.environ['DISPLAY']=='') + os.environ.get('DISPLAY', '') == '') _x11_skip_msg = "Skipped under *nix when X11/XOrg not available" skip_if_no_x11 = skipif(_x11_skip_cond, _x11_skip_msg)