def action(u):
cnf = Config()
+ holding = Holding()
# changes["distribution"] may not exist in corner cases
# (e.g. unreadable changes files)
###############################################################################
+def cleanup():
+ h = Holding()
+ if not Options["No-Action"]:
+ h.clean()
+
def process_it(changes_file):
global Logger
action(u)
except (SystemExit, KeyboardInterrupt):
+ cleanup()
raise
except:
print "ERROR"
traceback.print_exc(file=sys.stderr)
+ cleanup()
# Restore previous WD
os.chdir(u.prevdir)