From f462266b30abcad6b69c8b29fb1d856c04d6ac1f Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Thu, 23 Feb 2006 00:21:35 -0500 Subject: don't add an empty suboption description --HG-- extra : convert_revision : 594744c3d438aed08a23db376959930071b2c368 --- util/pbs/jobfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'util/pbs') diff --git a/util/pbs/jobfile.py b/util/pbs/jobfile.py index 5cdd343de..fd19b3bf5 100644 --- a/util/pbs/jobfile.py +++ b/util/pbs/jobfile.py @@ -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) -- cgit v1.2.3