<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 2: crash on starting on systems which do not define 'hostname'</title><link href="https://sourceforge.net/p/shython/bugs/2/" rel="alternate"/><link href="https://sourceforge.net/p/shython/bugs/2/feed.atom" rel="self"/><id>https://sourceforge.net/p/shython/bugs/2/</id><updated>2007-09-17T08:30:54Z</updated><subtitle>Recent changes to 2: crash on starting on systems which do not define 'hostname'</subtitle><entry><title>crash on starting on systems which do not define 'hostname'</title><link href="https://sourceforge.net/p/shython/bugs/2/" rel="alternate"/><published>2007-09-17T08:30:54Z</published><updated>2007-09-17T08:30:54Z</updated><author><name>Chris Dew</name><uri>https://sourceforge.net/u/chrisdew/</uri></author><id>https://sourceforge.net5452f1561bc6e9969c3a135912f42a78ae33ba33</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Ubuntu doesn't define the hostname variable - this causes shython to crash.&lt;/p&gt;
&lt;p&gt;fix: it could run the hostname command, if it couldn't find the hostname variable.&lt;/p&gt;
&lt;p&gt;chris@chris-laptop:~$ shython.py &lt;br /&gt;
Traceback (most recent call last):&lt;br /&gt;
File "/bin/shython.py", line 688, in &amp;lt;module&amp;gt;&lt;br /&gt;
Cline=Cmdline()&lt;br /&gt;
File "/bin/shython.py", line 22, in __init__&lt;br /&gt;
self._ps1dict={"\u":os.getlogin(),'@':'@',"\h":os.environ['HOSTNAME'].split('.')[0],"\W":" "+os.getcwd().split('/')[-1],"\w":" "+os.getcwd(),"\d":time.strftime(' %a %b %d'),"\$":" $" } &lt;br /&gt;
File "/usr/lib/python2.5/UserDict.py", line 22, in __getitem__&lt;br /&gt;
raise KeyError(key)&lt;br /&gt;
KeyError: 'HOSTNAME'&lt;/p&gt;
&lt;p&gt;Python 2.5.1 (r251:54863, May  2 2007, 16:56:35)&lt;br /&gt;
Ubuntu Feisty&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>