[Python-modules-commits] [python-pyotp] 01/01: Fix FTBFS on 32-bits platforms.

Hugo Lefeuvre hle at moszumanska.debian.org
Tue Aug 23 07:41:17 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 bc4fc3d4ec627b43c4f6cca96b26db8517a6542c
Author: Hugo Lefeuvre <hle at debian.org>
Date:   Fri Jul 15 16:47:41 2016 +0200

    Fix FTBFS on 32-bits platforms.
---
 debian/changelog                                |  6 ++++++
 debian/patches/series                           |  1 +
 debian/patches/timedelta-ingest-timestamp.patch | 15 +++++++++++++++
 3 files changed, 22 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 86cc477..e5a2a4e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+python-pyotp (2.1.1-2) unstable; urgency=medium
+
+  * Fix FTBFS on 32-bit platforms (Closes: #831399).
+
+ -- Hugo Lefeuvre <hle at debian.org>  Fri, 15 Jul 2016 16:45:17 +0200
+
 python-pyotp (2.1.1-1) unstable; urgency=low
 
   * Initial release (Closes: #829703).
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e7ca535
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+timedelta-ingest-timestamp.patch
diff --git a/debian/patches/timedelta-ingest-timestamp.patch b/debian/patches/timedelta-ingest-timestamp.patch
new file mode 100644
index 0000000..717c579
--- /dev/null
+++ b/debian/patches/timedelta-ingest-timestamp.patch
@@ -0,0 +1,15 @@
+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
+@@ -24,7 +24,7 @@
+         @param [Integer] counter_offset an amount of ticks to add to the time counter 
+         """
+         if not isinstance(for_time, datetime.datetime):
+-            for_time = datetime.datetime.fromtimestamp(int(for_time))
++            for_time = datetime.datetime.fromtimestamp(0) + datetime.timedelta(seconds=int(for_time))
+         return self.generate_otp(self.timecode(for_time) + counter_offset)
+ 
+     def now(self):

-- 
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