Changeset 562 for trunk


Ignore:
Timestamp:
Jun 2, 2008, 4:12:38 AM (16 years ago)
Author:
andersk
Message:

Use default version of python (currently 2.4), not 2.5.

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.5
     1#!/usr/bin/python
    22
    33"""
     
    77
    88from itertools import chain
    9 from subprocess import CalledProcessError, PIPE, Popen
     9from subprocess import PIPE, Popen
     10try:
     11    from subprocess import CalledProcessError
     12except 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)
    1023from sys import argv, stdout
    1124from yaml import safe_dump, safe_load
Note: See TracChangeset for help on using the changeset viewer.