Package Products :: Package ZenStatus :: Package nmap |
[hide private]
[frames] | no frames]

# Source Code for Package Products.ZenStatus.nmap

     1  ##############################################################################
     2  #
     3  # Copyright (C) Zenoss, Inc. 2011, all rights reserved.
     4  #
     5  # This content is made available according to terms specified in
     6  # License.zenoss under the directory where your Zenoss product is installed.
     7  #
     8  ##############################################################################
     9
    10
    11 -class NmapExecutionError(Exception):
    12      """
    13      NmapExecutionError raised when there was a problem calling nmap.
    14      """
    15
    16 -    def __init__(self, msg=None, exitCode=None, stdout=None, stderr=None, args=None):
    17          if msg is None:
    18              msg = "NmapExecution Error : %r, %r, %r" % (exitCode, stdout, stderr)
    19          super(NmapExecutionError, self).__init__(msg)
    20          self.exitCode = exitCode
    21          self.stdout = stdout
    22          self.stderr = stderr
    23          self.args = args
    24
    25  from lxml import etree as _etree
    26
    27 -class NmapParsingError(_etree.XMLSyntaxError):
    28      """
    29      NmapParsingError is raise when there is an error parsing the nmap XML output.
    30      """
    31      pass
    32
    33
    34 -class NmapNotFound(Exception):
    35      """
    36      NmapNotFound raised when nmap is not found.
    37      """
    38      pass
    39
    40 -class NmapNotSuid(Exception):
    41      """
    42      NmapNotFound raised when nmap is not found.
    43      """
    44      pass
    45