From 65a8c289333f8d3ce975943c8bc55aef3a7326f1 Mon Sep 17 00:00:00 2001 From: Geoff Gatward Date: Sun, 4 Nov 2018 10:31:48 +1100 Subject: [PATCH] Add missing float type for CV --- clean_content_views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clean_content_views.py b/clean_content_views.py index 04adfa9..7875553 100755 --- a/clean_content_views.py +++ b/clean_content_views.py @@ -178,7 +178,7 @@ def cleanup(ver_list, ver_descr, dry_run, runuser, ver_keep, cleanall, ignorefir print msg continue else: - if float(version['version']) < (lastver - float(ver_keep[cvid])): + if float(version['version']) < (float(lastver) - float(ver_keep[cvid])): msg = "Removing version " + str(version['version']) helpers.log_msg(msg, 'INFO') print helpers.HEADER + msg + helpers.ENDC @@ -220,7 +220,7 @@ def cleanup(ver_list, ver_descr, dry_run, runuser, ver_keep, cleanall, ignorefir except KeyError: msg = "Failed to initiate removal" helpers.log_msg(msg, 'WARNING') - + # Exit in the case of a dry-run if dry_run: msg = "Dry run - not actually performing removal"