canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #04384
[Merge] ~andersson123/autopkgtest-cloud:cleanup-ppa-containers-small-bugfix into autopkgtest-cloud:master
Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:cleanup-ppa-containers-small-bugfix into autopkgtest-cloud:master.
Commit message:
fix: cleanup-ppa-containers: datetime type comparison bugfix
There was a small bug which got missed in the initial MP of this script.
This commit amends the bug by not converting the datetime object to a
timestamp prior to comparison with another datetime object.
Requested reviews:
Canonical's Ubuntu QA (canonical-ubuntu-qa)
For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/467601
Just a small bugfix for the cleanup-ppa-containers script.
--
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:cleanup-ppa-containers-small-bugfix into autopkgtest-cloud:master.
diff --git a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/cleanup-ppa-containers b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/cleanup-ppa-containers
index ed04dcd..16af81f 100755
--- a/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/cleanup-ppa-containers
+++ b/charms/focal/autopkgtest-cloud-worker/autopkgtest-cloud/tools/cleanup-ppa-containers
@@ -38,7 +38,7 @@ def connect_swift():
def main():
swift_con = connect_swift()
_, container_list = swift_con.get_account()
- current_time = datetime.datetime.now().timestamp()
+ current_time = datetime.datetime.now()
upstream_regex = re.compile("^autopkgtest-[a-z]*-upstream-", re.DOTALL)
for container in container_list:
if container in SKIP_THESE_CONTAINERS or upstream_regex.search(