Print hostname in xterm title if sheridan is available in the environment
authorMarius Mauch <genone@gentoo.org>
Sat, 17 Feb 2007 09:14:53 +0000 (09:14 -0000)
committerMarius Mauch <genone@gentoo.org>
Sat, 17 Feb 2007 09:14:53 +0000 (09:14 -0000)
svn path=/main/trunk/; revision=5976

bin/emerge

index 389c4722209f045dc363c70dd62c8023d1459aa4..8188715198e58cc1cc8bfd90003bc41e7c6f5221 100755 (executable)
@@ -232,10 +232,11 @@ shortmapping={
 
 def emergelog(xterm_titles, mystr, short_msg=None):
        if xterm_titles:
-               if short_msg:
-                       xtermTitle(short_msg)
-               else:
-                       xtermTitle(mystr)
+               if short_msg == None:
+                       short_msg = mystr
+               if "HOSTNAME" in os.environ.keys():
+                       short_msg = os.environ["HOSTNAME"]+": "+short_msg
+               xtermTitle(short_msg)
        try:
                file_path = "/var/log/emerge.log"
                mylogfile = open(file_path, "a")