data flow #14

Closed
georgefs opened this Issue Apr 18, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@georgefs

恩..套關係失敗~ 直接發好了

linux 指令特性, 流程
command1 && command2
command1 的exit code == 0 才會繼續command2

core.py
531...
try:
# execute the command with the raw arguments.
return_val = cmd.execute(raw_args)
except Exception, e:
if self.debug:
from traceback import print_exception
print_exception(*sys.exc_info())
return
else:
self.complain(e)
return
可以明顯的看到 你在cli程式出錯後 接到exception 沒有送exit code.. 所以流程&&沒用..

483...
def complain(self, msg):
'''Print an error message msg with the name of this program to stderr.'''
print >> sys.stderr, '%s: %s' % (self.name, msg)
可是這邊又有把錯誤訊息送到stderr

我想應該是你漏掉了...

@moskytw

This comment has been minimized.

Show comment
Hide comment
@moskytw

moskytw Apr 19, 2013

Owner

fixed with commit bdc2fca. Thanks for reminder.

Owner

moskytw commented Apr 19, 2013

fixed with commit bdc2fca. Thanks for reminder.

@moskytw moskytw closed this Apr 19, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment