comparison cmd2.py @ 284:e02b85e6aee1

do not poutput empty messages
author catherine@DellZilla
date Fri, 09 Oct 2009 11:52:50 -0400
parents bff1f19275e7
children 58be960b8bf9
comparison
equal deleted inserted replaced
283:bff1f19275e7 284:e02b85e6aee1
280 'case_insensitive', 'feedback_to_output', 'quiet', 'echo', 'timing', 280 'case_insensitive', 'feedback_to_output', 'quiet', 'echo', 'timing',
281 'abbrev'] 281 'abbrev']
282 settable.sort() 282 settable.sort()
283 283
284 def poutput(self, msg): 284 def poutput(self, msg):
285 self.stdout.write(msg) 285 if msg:
286 if msg[-1] != '\n': 286 self.stdout.write(msg)
287 self.stdout.write('\n') 287 if msg[-1] != '\n':
288 self.stdout.write('\n')
288 def perror(self, errmsg, statement=None): 289 def perror(self, errmsg, statement=None):
289 if self.debug: 290 if self.debug:
290 traceback.print_exc() 291 traceback.print_exc()
291 print str(errmsg) 292 print str(errmsg)
292 def pfeedback(self, msg): 293 def pfeedback(self, msg):