From 460da7442afa5ec9923c609e51d3a81b1e547ca8 2012-06-15 00:27:52 From: MinRK Date: 2012-06-15 00:27:52 Subject: [PATCH] USER in prompts default to '' instead of None --- diff --git a/IPython/core/prompts.py b/IPython/core/prompts.py index fbcd2a3..a7dd33a 100644 --- a/IPython/core/prompts.py +++ b/IPython/core/prompts.py @@ -140,7 +140,7 @@ HOME = py3compat.str_to_unicode(os.environ.get("HOME","//////:::::ZZZZZ,,,~~~")) # We precompute a few more strings here for the prompt_specials, which are # fixed once ipython starts. This reduces the runtime overhead of computing # prompt strings. -USER = py3compat.str_to_unicode(os.environ.get("USER")) +USER = py3compat.str_to_unicode(os.environ.get("USER",'')) HOSTNAME = py3compat.str_to_unicode(socket.gethostname()) HOSTNAME_SHORT = HOSTNAME.split(".")[0] ROOT_SYMBOL = "#" if (os.name=='nt' or os.getuid()==0) else "$"