[Python-modules-commits] [python-pyotp] 01/02: Update upstream patch for #831399
Hugo Lefeuvre
hle at moszumanska.debian.org
Sat Sep 3 14:07:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
hle pushed a commit to branch master
in repository python-pyotp.
commit 3cdb4e05e9451625dd8e499253fe47967ececc8a
Author: Hugo Lefeuvre <hle at debian.org>
Date: Wed Aug 31 12:24:45 2016 +0200
Update upstream patch for #831399
---
debian/patches/timedelta-ingest-timestamp.patch | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/debian/patches/timedelta-ingest-timestamp.patch b/debian/patches/timedelta-ingest-timestamp.patch
index 717c579..6890971 100644
--- a/debian/patches/timedelta-ingest-timestamp.patch
+++ b/debian/patches/timedelta-ingest-timestamp.patch
@@ -1,9 +1,9 @@
Subject: Use timedelta to ingest timestamp
Origin: upstream
Bug-Debian: https://bugs.debian.org/831399
-Last-Update: 2016-08-23
---- a/src/pyotp/totp.py 2016-07-05 17:01:38.350583818 +0200
-+++ b/src/pyotp/totp.py 2016-08-23 09:28:22.324131669 +0200
+Last-Update: 2016-08-31
+--- a/src/pyotp/totp.py 2016-08-31 12:22:53.183244421 +0200
++++ b/src/pyotp/totp.py 2016-08-31 12:22:53.183244421 +0200
@@ -24,7 +24,7 @@
@param [Integer] counter_offset an amount of ticks to add to the time counter
"""
@@ -13,3 +13,16 @@ Last-Update: 2016-08-23
return self.generate_otp(self.timecode(for_time) + counter_offset)
def now(self):
+--- a/test.py 2016-08-31 12:22:43.471268681 +0200
++++ b/test.py 2016-08-31 12:23:10.411201361 +0200
+@@ -92,6 +92,10 @@
+ for digest, secret in self.RFC_VALUES:
+ totp = pyotp.TOTP(base64.b32encode(secret), 8, digest)
+ for utime, code in self.RFC_VALUES[(digest, secret)]:
++ # 32-bit platforms use native functions to handle timestamps, so they fail this test
++ # (and will fail after 19 January 2038)
++ if utime > sys.maxsize:
++ continue
+ value = totp.at(utime)
+ msg = "%s != %s (%s, time=%d)"
+ msg %= (value, code, digest().name, utime)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyotp.git
More information about the Python-modules-commits
mailing list