Fix flake8 warnings

This commit is contained in:
Chronial committed 2019-08-16 23:58:22 +02:00
1 parent 051976f560
commit 3964935580
1 file changed
+5 -5
+5 -5
View File
@@ -129,7 +129,7 @@ def finish(is_success):
if ("error", "success")[is_success] in config["email"]["sendon"]:
try:
send_email(is_success)
except:
except Exception:
logging.exception("Failed to send email")
if is_success:
logging.info("Run finished successfully")
@@ -219,14 +219,14 @@ def main():
try:
load_config(args)
except:
except Exception:
print("unexpected exception while loading config")
print(traceback.format_exc())
sys.exit(2)
try:
setup_logger()
except:
except Exception:
print("unexpected exception while setting up logging")
print(traceback.format_exc())
sys.exit(2)
@@ -265,8 +265,8 @@ def run():
diff_results = Counter(line.split(" ")[0] for line in diff_out)
diff_results = dict((x, diff_results[x]) for x in
["add", "remove", "move", "update"])
logging.info(("Diff results: {add} added, {remove} removed, "
+ "{move} moved, {update} modified").format(**diff_results))
logging.info(("Diff results: {add} added, {remove} removed, " +
"{move} moved, {update} modified").format(**diff_results))
if (config["snapraid"]["deletethreshold"] >= 0 and
diff_results["remove"] > config["snapraid"]["deletethreshold"]):