cleanup
This commit is contained in:
parent
c0917955c0
commit
f9eefde102
1 changed files with 5 additions and 1 deletions
|
|
@ -469,6 +469,10 @@ def rmtree(path, logger=None):
|
|||
SimpleProxyLogger.send(logfile, logger)
|
||||
except Exception as err:
|
||||
logger.error("Failed to get rmtree logs -- %s" % err)
|
||||
try:
|
||||
os.unlink(logfile)
|
||||
except Exception:
|
||||
pass
|
||||
if not isSuccess(status):
|
||||
raise koji.GenericError(parseStatus(status, "rmtree process"))
|
||||
if os.path.exists(path):
|
||||
|
|
@ -534,6 +538,7 @@ class SimpleProxyLogger(object):
|
|||
level = logging.ERROR
|
||||
msg = "Bad log data: %r"
|
||||
args = (line,)
|
||||
kwargs = {}
|
||||
logger.log(level, msg, *args, **kwargs)
|
||||
|
||||
|
||||
|
|
@ -668,7 +673,6 @@ def _assert_cwd(cwd):
|
|||
raise
|
||||
if cwd != actual:
|
||||
raise koji.GenericError('CWD changed unexpectedly: %s -> %s' % (cwd, actual))
|
||||
print('CWD changed unexpectedly: %s -> %s' % (cwd, actual))
|
||||
|
||||
|
||||
def _stripcwd(dev, cwd, logger):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue