From 745ca9e140d9ccab420b68b1ff74de0cbf3cbade Mon Sep 17 00:00:00 2001 From: Prinz23 Date: Thu, 5 Jul 2018 18:52:19 +0200 Subject: [PATCH] Fix Uuid1 Python Bug. Add fallback to uuid4 when uuid1 fails with ValueError https://bugs.python.org/issue32502 --- CHANGES.md | 7 ++++++- sickbeard/common.py | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3a62d00a..2e303f87 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.16.18 (2018-07-05 14:45:00 UTC) +### 0.16.19 (2018-07-05 18:10:00 UTC) + +* Fix Uuid1 Python Bug, add fallback to uuid4 when uuid1 fails with ValueError https://bugs.python.org/issue32502 + + +### 0.16.18 (2018-07-05 14:45:00 UTC) * Fix Scenetime torrent provider * Change disable search torrents on first installation diff --git a/sickbeard/common.py b/sickbeard/common.py index c2d8807d..15379a08 100644 --- a/sickbeard/common.py +++ b/sickbeard/common.py @@ -26,7 +26,10 @@ import uuid import logger import sickbeard -INSTANCE_ID = str(uuid.uuid1()) +try: + INSTANCE_ID = str(uuid.uuid1()) +except ValueError: + INSTANCE_ID = str(uuid.uuid4()) USER_AGENT = ('SickGear/(%s; %s; %s)' % (platform.system(), platform.release(), INSTANCE_ID))