Remove requirement of Python 3.7+ (just Python 3 is needed)
authorMark J. Cox <mark@awe.com>
Thu, 6 Feb 2020 09:29:24 +0000 (09:29 +0000)
committerMark J. Cox <mark@awe.com>
Thu, 6 Feb 2020 10:17:07 +0000 (10:17 +0000)
github-approve-label-workflow/README.md
github-approve-label-workflow/github-approve-label-workflow.py

index 8442b5846ceed2e8b164125bcea7b6274a3b4e99..6acf9286ff77c45361769a41674ae089e0c72c1d 100644 (file)
@@ -16,3 +16,5 @@ python github-approve-label-workflow --debug --token token.txt
 or to also actually change any labels
 
 python github-approve-label-workflow --debug --token token.txt --commit
+
+Requires Python 3
index 99713f700b2ffff5094c8867090455375fa6b373..93ffd72395d02821a9335208f0c8b28dbfc4e7a6 100644 (file)
@@ -1,5 +1,5 @@
 #! /usr/bin/env python
-# requires python 3.7+
+# requires python 3
 #
 # Do we have any open PR's that have label "Approval: done"
 # that are over 24 hours without any other comments?
@@ -20,8 +20,7 @@ from optparse import OptionParser
 api_url = "https://api.github.com/repos/openssl/openssl"
 
 def convertdate(date):
-    # python fromisoformat needs a TZ in hours/minutes
-    return datetime.fromisoformat(date.replace('Z', '+00:00'))
+    return datetime.strptime(date.replace('Z',"+0000"), "%Y-%m-%dT%H:%M:%S%z")
 
 # Get all the open pull requests, filtering by approval: done label