summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lwirzenius@wikimedia.org>2019-07-24 15:20:33 +0300
committerLars Wirzenius <lwirzenius@wikimedia.org>2019-07-24 15:20:33 +0300
commit71d355f1a4185e64ece9c95be20b517f4574f894 (patch)
tree97fd1e8a0be5b4a531bae7b3659c777dc5608736
parent5a6df86e0134b47f51442199eca687918d9430ae (diff)
downloadwmf-ci-arch-71d355f1a4185e64ece9c95be20b517f4574f894.tar.gz
Fix: use integer timestamps
-rwxr-xr-xcreate-artifact-download-token2
-rwxr-xr-xcreate-artifact-upload-token2
-rwxr-xr-xcreate-controller-token2
-rwxr-xr-xcreate-token2
4 files changed, 4 insertions, 4 deletions
diff --git a/create-artifact-download-token b/create-artifact-download-token
index 999c99f..66bb6a9 100755
--- a/create-artifact-download-token
+++ b/create-artifact-download-token
@@ -31,7 +31,7 @@ scopes = 'uapi_blobs_id_get'
key_text = open(filename, 'r').read()
key = Crypto.PublicKey.RSA.importKey(key_text)
-now = time.time()
+now = int(time.time())
claims = {
'iss': iss,
'sub': 'subject-uuid',
diff --git a/create-artifact-upload-token b/create-artifact-upload-token
index e0d186d..0c85fb5 100755
--- a/create-artifact-upload-token
+++ b/create-artifact-upload-token
@@ -31,7 +31,7 @@ scopes = 'uapi_blobs_id_put'
key_text = open(filename, 'r').read()
key = Crypto.PublicKey.RSA.importKey(key_text)
-now = time.time()
+now = int(time.time())
claims = {
'iss': iss,
'sub': 'subject-uuid',
diff --git a/create-controller-token b/create-controller-token
index bfd0905..8d05933 100755
--- a/create-controller-token
+++ b/create-controller-token
@@ -31,7 +31,7 @@ scopes = 'update-repo publish'
key_text = open(filename, 'r').read()
key = Crypto.PublicKey.RSA.importKey(key_text)
-now = time.time()
+now = int(time.time())
claims = {
'iss': iss,
'sub': 'subject-uuid',
diff --git a/create-token b/create-token
index e2e9fbb..4e3f38f 100755
--- a/create-token
+++ b/create-token
@@ -31,7 +31,7 @@ scopes = ' '.join(sys.argv[4].split())
key_text = open(filename, 'r').read()
key = Crypto.PublicKey.RSA.importKey(key_text)
-now = time.time()
+now = int(time.time())
claims = {
'iss': iss,
'sub': 'subject-uuid',