Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Commit 1e14304

Browse files
author
Mangled Deutz
committed
Slightly enhanced driver interface + more verbose exception
Docker-DCO-1.1-Signed-off-by: Mangled Deutz <[email protected]> (github: dmp42)
1 parent e839b65 commit 1e14304

File tree

1 file changed

+7
-3
lines changed
  • depends/docker-registry-core/docker_registry/core

1 file changed

+7
-3
lines changed

depends/docker-registry-core/docker_registry/core/driver.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ class Base(object):
6363
# By default no storage plugin supports it
6464
supports_bytes_range = False
6565

66+
def __init__(self, path=None, config=None):
67+
pass
68+
6669
# FIXME(samalba): Move all path resolver in each module (out of the base)
6770
def images_list_path(self, namespace, repository):
6871
repository_path = self.repository_path(
@@ -232,13 +235,14 @@ def fetch(name):
232235
module = __import__('docker_registry.drivers.%s' % name, globals(),
233236
locals(), ['Storage'], 0) # noqa
234237
logger.debug("Will return docker-registry.drivers.%s.Storage" % name)
235-
except ImportError:
238+
except ImportError as e:
239+
logger.warn("Got exception: %s" % e)
236240
raise NotImplementedError(
237241
"""You requested storage driver docker_registry.drivers.%s
238242
which is not installed. Try `pip install docker-registry-driver-%s`
239243
or check your configuration. The following are currently
240-
available on your system: %s"""
241-
% (name, name, available())
244+
available on your system: %s. Exception was: %s"""
245+
% (name, name, available(), e)
242246
)
243247
module.Storage.scheme = name
244248
return module.Storage

0 commit comments

Comments
 (0)