OpenSecurity/bin/cygwin.py
changeset 152 028c3055147f
parent 145 758031cf192a
child 165 a1b7a5a48a1e
     1.1 --- a/OpenSecurity/bin/cygwin.py	Tue May 13 10:24:57 2014 +0200
     1.2 +++ b/OpenSecurity/bin/cygwin.py	Thu May 15 09:19:09 2014 +0100
     1.3 @@ -257,6 +257,13 @@
     1.4      def cygPath(path):
     1.5          cmd = 'cygpath -u \'' + path + '\''
     1.6          return Cygwin.bashExecute(cmd)[1].rstrip('\n')
     1.7 +    
     1.8 +    @staticmethod
     1.9 +    def checkResult(result):
    1.10 +        if result[0] != 0:
    1.11 +            logger.error('Command failed:' + ''.join(result[2]))
    1.12 +            raise OpenSecurityException('Command failed:' + ''.join(result[2]))
    1.13 +        return result
    1.14                  
    1.15  # start
    1.16  import os