don't add an empty suboption description
authorNathan Binkert <binkertn@umich.edu>
Thu, 23 Feb 2006 05:21:35 +0000 (00:21 -0500)
committerNathan Binkert <binkertn@umich.edu>
Thu, 23 Feb 2006 05:21:35 +0000 (00:21 -0500)
--HG--
extra : convert_revision : 594744c3d438aed08a23db376959930071b2c368

util/pbs/jobfile.py

index 5cdd343de79c3fbcd2a047e6362a81f1942aa611..fd19b3bf5bad86fc9f8fb7784b8392a7a2dfd24d 100644 (file)
@@ -277,10 +277,11 @@ class Option(Data):
             return name
 
         if attr == 'desc':
-            desc = self.__dict__[attr]
-            if self._suboption is not None:
-                desc = '%s, %s' % (desc, self._suboption.desc)
-            return desc
+            desc = [ self.__dict__[attr] ]
+            if self._suboption is not None and self._suboption.desc:
+                desc.append(self._suboption.desc)
+            return ', '.join(desc)
+
 
         return super(Option, self).__getattribute__(attr)