Package schrodinger :: Package job :: Module remote_command :: Class CommandError
[hide private]
[frames] | no frames]

Class CommandError

              object --+            
                       |            
exceptions.BaseException --+        
                           |        
        exceptions.Exception --+    
                               |    
        exceptions.StandardError --+
                                   |
                                  CommandError

Used to report external commands that fail.

When this is caught by the main cmdline driver, the error message will be printed and the usage message displayed.

Instance Methods [hide private]
 
__init__(self, sp_error=None, command='', errmsg=None, output='', userhost='', returncode=None)
The constructor takes a subprocess.CalledProcessError for the failed command, from which details of the command are extracted.
 
__str__(self)
str(x)

Inherited from exceptions.StandardError: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from exceptions.BaseException: args, message

Inherited from object: __class__

Method Details [hide private]

__init__(self, sp_error=None, command='', errmsg=None, output='', userhost='', returncode=None)
(Constructor)

 

The constructor takes a subprocess.CalledProcessError for the failed command, from which details of the command are extracted. A user- friendly error message will be composed from that information unless an explicit error message is provided.

Overrides: object.__init__

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)