From 6849bf0287150e2be0afaf2432325676a5072154 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sat, 10 Mar 2007 17:01:18 +0000 Subject: [PATCH] =?utf8?q?Crear=20"secci=C3=B3n"=20con=20todas=20las=20exc?= =?utf8?q?epciones.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sercom/tester.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/sercom/tester.py b/sercom/tester.py index a77c573..da630d5 100644 --- a/sercom/tester.py +++ b/sercom/tester.py @@ -15,17 +15,7 @@ import logging log = logging.getLogger('sercom.tester') -class CalledProcessError(Exception): #{{{ Python 2.5 forward-compatibility - """This exception is raised when a process run by check_call() returns - a non-zero exit status. The exit status will be stored in the - returncode attribute.""" - def __init__(self, returncode, cmd): - self.returncode = returncode - self.cmd = cmd - def __str__(self): - return ("Command '%s' returned non-zero exit status %d" - % (self.cmd, self.returncode)) -#}}} +error_interno = _(u'\n**Error interno al preparar la entrega.**') def check_call(*popenargs, **kwargs): #{{{ Python 2.5 forward-compatibility """Run command with arguments. Wait for command to complete. If @@ -47,13 +37,27 @@ def check_call(*popenargs, **kwargs): #{{{ Python 2.5 forward-compatibility return retcode #}}} +#{{{ Excepciones + +class CalledProcessError(Exception): #{{{ Python 2.5 forward-compatibility + """This exception is raised when a process run by check_call() returns + a non-zero exit status. The exit status will be stored in the + returncode attribute.""" + def __init__(self, returncode, cmd): + self.returncode = returncode + self.cmd = cmd + def __str__(self): + return ("Command '%s' returned non-zero exit status %d" + % (self.cmd, self.returncode)) +#}}} + class Error(StandardError): pass class ExecutionFailure(Error, RuntimeError): pass class RsyncError(Error, EnvironmentError): pass -error_interno = _(u'\n**Error interno al preparar la entrega.**') +#}}} def unzip(bytes, dst): # {{{ log.debug(_(u'Intentando descomprimir en %s'), dst) -- 2.43.0