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