comparison profilemanager/command.py @ 55:3b53d584195f

dont print None
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 May 2010 11:35:40 -0700
parents 81500171fda8
children 18f16bd1ba6b
comparison
equal deleted inserted replaced
54:f3812255ce6e 55:3b53d584195f
162 162
163 # invoke the command 163 # invoke the command
164 retval = getattr(_object, name)(*command_args, **command_options.__dict__) 164 retval = getattr(_object, name)(*command_args, **command_options.__dict__)
165 165
166 # print the output 166 # print the output
167 if isinstance(retval, basestring): 167 if retval is None:
168 pass
169 elif isinstance(retval, basestring):
168 print retval 170 print retval
169 elif isinstance(retval, dict): 171 elif isinstance(retval, dict):
170 for key in sorted(retval.keys()): 172 for key in sorted(retval.keys()):
171 print '%s: %s' % (key, retval[key]) 173 print '%s: %s' % (key, retval[key])
172 elif hasattr(retval, '__iter__'): 174 elif hasattr(retval, '__iter__'):