How to use the ifcfg.exc.IfcfgError function in ifcfg

To help you get started, we’ve selected a few ifcfg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ftao / python-ifcfg / tests / exc_tests.py View on Github external
@raises(ifcfg.exc.IfcfgError)
def test_error():
    try:
        raise ifcfg.exc.IfcfgError('Error Msg')
    except ifcfg.exc.IfcfgError as e:
        eq_(e.msg, 'Error Msg')
        raise
github ftao / python-ifcfg / ifcfg / exc.py View on Github external
class IfcfgError(Exception):
    """Generic Ifcfg Errors."""
    def __init__(self, msg):
        self.msg = msg
    
class IfcfgParserError(IfcfgError):
    """Ifcfg Parsing Errors."""
    def __init__(self, *args, **kw):
        super(IfcfgParserError, self).__init__(*args, **kw)