diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-14 19:09:48 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-10-14 19:09:48 (GMT) |
commit | 04437ebadd8f3c086ecc920d98c4868ae1d27a35 (patch) | |
tree | ded002f8621e802e46f04fb3cd2b601089c2c358 /Lib | |
parent | 92331d5e1be51aa990836dd8f0c43b33e8802a7d (diff) | |
download | cpython-04437ebadd8f3c086ecc920d98c4868ae1d27a35.zip cpython-04437ebadd8f3c086ecc920d98c4868ae1d27a35.tar.gz cpython-04437ebadd8f3c086ecc920d98c4868ae1d27a35.tar.bz2 |
Fix py3k warnings in the uuid module
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/uuid.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/uuid.py b/Lib/uuid.py index 4840fa5..6aaa2b4 100644 --- a/Lib/uuid.py +++ b/Lib/uuid.py @@ -489,8 +489,8 @@ def uuid1(node=None, clock_seq=None): nanoseconds = int(time.time() * 1e9) # 0x01b21dd213814000 is the number of 100-ns intervals between the # UUID epoch 1582-10-15 00:00:00 and the Unix epoch 1970-01-01 00:00:00. - timestamp = int(nanoseconds/100) + 0x01b21dd213814000L - if timestamp <= _last_timestamp: + timestamp = int(nanoseconds//100) + 0x01b21dd213814000L + if _last_timestamp is not None and timestamp <= _last_timestamp: timestamp = _last_timestamp + 1 _last_timestamp = timestamp if clock_seq is None: |