Blame SOURCES/0001-remove-python-redis-requirement.patch

d01e70
From 4282d6fa380fcda2d3146505427738b8ff4ff5c6 Mon Sep 17 00:00:00 2001
d01e70
From: Lokesh Mandvekar <lsm5@fedoraproject.org>
d01e70
Date: Wed, 21 Jan 2015 13:33:45 -0500
d01e70
Subject: [PATCH] remove python-redis requirement
d01e70
d01e70
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
d01e70
---
d01e70
 depends/docker-registry-core/docker_registry/core/lru.py | 5 ++++-
d01e70
 docker_registry/lib/cache.py                             | 5 ++++-
d01e70
 docker_registry/lib/rlock.py                             | 5 ++++-
d01e70
 scripts/bandwidth_parser.py                              | 5 ++++-
d01e70
 scripts/diff-worker.py                                   | 5 ++++-
d01e70
 5 files changed, 20 insertions(+), 5 deletions(-)
d01e70
d01e70
diff --git a/depends/docker-registry-core/docker_registry/core/lru.py b/depends/docker-registry-core/docker_registry/core/lru.py
d01e70
index 6c246a6..f76e772 100644
d01e70
--- a/depends/docker-registry-core/docker_registry/core/lru.py
d01e70
+++ b/depends/docker-registry-core/docker_registry/core/lru.py
d01e70
@@ -27,7 +27,10 @@ By default, doesn't run, until one calls init().
d01e70
 import functools
d01e70
 import logging
d01e70
d01e70
-import redis
d01e70
+try:
d01e70
+    import redis
d01e70
+except:
d01e70
+    pass
d01e70
 logger = logging.getLogger(__name__)
d01e70
d01e70
 redis_conn = None
d01e70
diff --git a/docker_registry/lib/cache.py b/docker_registry/lib/cache.py
d01e70
index 307fb69..291a140 100644
d01e70
--- a/docker_registry/lib/cache.py
d01e70
+++ b/docker_registry/lib/cache.py
d01e70
@@ -2,7 +2,10 @@
d01e70
d01e70
 import logging
d01e70
d01e70
-import redis
d01e70
+try:
d01e70
+    import redis
d01e70
+except:
d01e70
+    pass
d01e70
d01e70
 from docker_registry.core import lru
d01e70
d01e70
diff --git a/docker_registry/lib/rlock.py b/docker_registry/lib/rlock.py
d01e70
index 7e6c4ee..8caa0fd 100644
d01e70
--- a/docker_registry/lib/rlock.py
d01e70
+++ b/docker_registry/lib/rlock.py
d01e70
@@ -4,7 +4,10 @@
d01e70
d01e70
 import time
d01e70
d01e70
-import redis
d01e70
+try:
d01e70
+    import redis
d01e70
+except:
d01e70
+    pass
d01e70
d01e70
d01e70
 class LockTimeout(BaseException):
d01e70
diff --git a/scripts/bandwidth_parser.py b/scripts/bandwidth_parser.py
d01e70
index 6cf37f8..4f423be 100755
d01e70
--- a/scripts/bandwidth_parser.py
d01e70
+++ b/scripts/bandwidth_parser.py
d01e70
@@ -6,7 +6,10 @@ import logging
d01e70
 import re
d01e70
 import sys
d01e70
d01e70
-import redis
d01e70
+try:
d01e70
+    import redis
d01e70
+except:
d01e70
+    pass
d01e70
d01e70
 logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s',
d01e70
                     level=logging.INFO)
d01e70
diff --git a/scripts/diff-worker.py b/scripts/diff-worker.py
d01e70
index 65eeede..0bc3678 100755
d01e70
--- a/scripts/diff-worker.py
d01e70
+++ b/scripts/diff-worker.py
d01e70
@@ -5,7 +5,10 @@ import argparse  # noqa
d01e70
 import logging
d01e70
 import os
d01e70
d01e70
-import redis
d01e70
+try:
d01e70
+    import redis
d01e70
+except:
d01e70
+    pass
d01e70
d01e70
 from docker_registry.lib import layers
d01e70
 from docker_registry.lib import rlock
d01e70
-- 
d01e70
1.8.3.1
d01e70