Changeset 2095 for trunk/packages/invirt-base/python
- Timestamp:
- Feb 5, 2009, 3:19:30 AM (16 years ago)
- Location:
- trunk/packages/invirt-base/python/invirt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/invirt-base/python/invirt/common.py
r1935 r2095 76 76 class CodeError(Exception): 77 77 """Exception for internal errors or bad faith input.""" 78 pass 78 def __init__(self, message, code=None): 79 Exception.__init__(self, message) 80 self.code = code 79 81 80 82 # -
trunk/packages/invirt-base/python/invirt/remctl.py
r1621 r2095 37 37 stderr=subprocess.PIPE) 38 38 v = p.wait() 39 if kws.get('err'):40 return p.stdout.read(), p.stderr.read()41 39 if v: 42 print >> sys.stderr, 'Error', v, 'on remctl', args, ':' 43 print >> sys.stderr, p.stderr.read() 44 raise CodeError('ERROR on remctl') 40 raise CodeError('ERROR on remctl %s:\n%s' % (args, p.stderr.read()), v) 45 41 return p.stdout.read()
Note: See TracChangeset
for help on using the changeset viewer.