replace CdistError with cdist.Error

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-09-27 00:49:12 +02:00
parent 326ff67283
commit 2c0a7adf74
2 changed files with 2 additions and 2 deletions

View file

@ -24,6 +24,7 @@ import logging
import os import os
import sys import sys
import cdist
import cdist.path import cdist.path
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -87,7 +88,7 @@ def emulator(argv):
try: try:
os.makedirs(param_out_dir, exist_ok=True) os.makedirs(param_out_dir, exist_ok=True)
except OSError as error: except OSError as error:
raise CdistError(param_out_dir + ": " + error.args[1]) raise cdist.Error(param_out_dir + ": " + error.args[1])
# Record parameter # Record parameter
params = vars(args) params = vars(args)

View file

@ -58,7 +58,6 @@ def shell_run_or_debug_fail(script, *args, remote_prefix=False, **kargs):
except OSError as error: except OSError as error:
raise cdist.Error(" ".join(*args) + ": " + error.args[1]) raise cdist.Error(" ".join(*args) + ": " + error.args[1])
def run_or_fail(*args, remote_prefix=False, **kargs): def run_or_fail(*args, remote_prefix=False, **kargs):
if remote_prefix: if remote_prefix:
args[0][:0] = remote_prefix args[0][:0] = remote_prefix