Fixed exception issues
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from .common_utils import UtilsNetworkError, forceIP
|
||||
from .exceptions import ParamProcessingError
|
||||
from .common_utils import forceIP
|
||||
from .exceptions import ParamProcessingError, NetworkError
|
||||
|
||||
|
||||
__all__ = ('ParamProcessingError', 'processHost')
|
||||
@@ -16,5 +16,5 @@ def processHost(param, process_args=None):
|
||||
process_args.get('allow_localhost', False)
|
||||
try:
|
||||
return forceIP(param, allow_localhost=localhost)
|
||||
except UtilsNetworkError, ex:
|
||||
except NetworkError, ex:
|
||||
raise ParamProcessingError(str(ex))
|
||||
|
||||
@@ -1,6 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
__all__ = ()
|
||||
__all__ = (
|
||||
'PackStackError',
|
||||
|
||||
'InstallError',
|
||||
'FlagValidationError',
|
||||
|
||||
'PluginError',
|
||||
'ParamProcessingError',
|
||||
|
||||
'NetworkError',
|
||||
'ScriptRuntimeError',
|
||||
)
|
||||
|
||||
|
||||
class PackStackError(Exception):
|
||||
|
||||
@@ -101,6 +101,7 @@ def waitforpuppet(currently_running):
|
||||
|
||||
except ScriptRuntimeError, e:
|
||||
# the test raises an exception if the file doesn't exist yet
|
||||
# TO-DO: We need to start testing 'e' for unexpected exceptions
|
||||
time.sleep(3)
|
||||
print
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user