small change in net use result check
authorBarthaM@N3SIM1218.D03.arc.local
Thu, 05 Jun 2014 09:59:58 +0100
changeset 177269e73c34b20
parent 176 32c895509a2a
child 179 04f1f06faaf0
small change in net use result check
OpenSecurity/bin/opensecurity_client_restful_server.py
     1.1 --- a/OpenSecurity/bin/opensecurity_client_restful_server.py	Wed Jun 04 16:42:37 2014 +0100
     1.2 +++ b/OpenSecurity/bin/opensecurity_client_restful_server.py	Thu Jun 05 09:59:58 2014 +0100
     1.3 @@ -322,11 +322,11 @@
     1.4              retry-=1
     1.5      
     1.6          command = 'USE ' + drive + ' ' + self.networkPath + ' /PERSISTENT:NO'
     1.7 -    
     1.8 -        result = Cygwin.checkResult(Cygwin.execute('C:\\Windows\\system32\\NET', command))
     1.9 -        if string.find(result[1], 'successfully',) == -1:
    1.10 -            logger.error("Failed: NET " + command)
    1.11 -            return 1
    1.12 +        result = [1]
    1.13 +        try:
    1.14 +            result = Cygwin.checkResult(Cygwin.execute('C:\\Windows\\system32\\NET', command))
    1.15 +        except:
    1.16 +            return result[0]
    1.17          return 0
    1.18  
    1.19  class os_netmount: