- Timestamp:
- Jun 2, 2008, 4:12:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-remote-server/files/usr/sbin/sipb-xen-remote-listvms
r561 r562 1 #!/usr/bin/ env python2.51 #!/usr/bin/python 2 2 3 3 """ … … 7 7 8 8 from itertools import chain 9 from subprocess import CalledProcessError, PIPE, Popen 9 from subprocess import PIPE, Popen 10 try: 11 from subprocess import CalledProcessError 12 except ImportError: 13 # Python 2.4 doesn't implement CalledProcessError 14 class CalledProcessError(Exception): 15 """This exception is raised when a process run by check_call() returns 16 a non-zero exit status. The exit status will be stored in the 17 returncode attribute.""" 18 def __init__(self, returncode, cmd): 19 self.returncode = returncode 20 self.cmd = cmd 21 def __str__(self): 22 return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode) 10 23 from sys import argv, stdout 11 24 from yaml import safe_dump, safe_load
Note: See TracChangeset
for help on using the changeset viewer.