diff --git a/pupy/packages/posix/all/become.py b/pupy/packages/posix/all/become.py index 08e6143d..9e56b3a5 100644 --- a/pupy/packages/posix/all/become.py +++ b/pupy/packages/posix/all/become.py @@ -49,7 +49,7 @@ def become(user): if os.path.exists(user_dbus_socket): os.environ['DBUS_SESSION_BUS_ADDRESS'] = 'unix:path='+user_dbus_socket - else: + elif 'DBUS_SESSION_BUS_ADDRESS' in os.environ: del os.environ['DBUS_SESSION_BUS_ADDRESS'] for var in os.environ.keys():