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

Commit 9baadda

Browse files
author
shin-
committed
Fixed imports and paths
1 parent c0f03ca commit 9baadda

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

docker_registry/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from .images import *
1919
from .lib import config
2020
from .status import *
21+
from .search import *
2122

2223
cfg = config.load()
2324
if cfg.standalone is not False:

lib/index/__init__.py renamed to docker_registry/lib/index/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"""
33

44
import importlib
5-
import signals
65

7-
import config
6+
from .. import config
7+
from .. import signals
88

99

1010
__all__ = ['load']

lib/index/db.py renamed to docker_registry/lib/index/db.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
import sqlalchemy.orm
88
import sqlalchemy.sql.functions
99

10-
import config
11-
import storage
12-
10+
from ... import storage
11+
from .. import config
1312
from . import Index
1413

1514

@@ -97,9 +96,11 @@ def _handle_repository_updated(
9796
description = '' # TODO(wking): store descriptions
9897
session = self._session()
9998
session.query(Repository).filter(
100-
Repository.name == name).update(
101-
values={'description': description},
102-
synchronize_session=False)
99+
Repository.name == name
100+
).update(
101+
values={'description': description},
102+
synchronize_session=False
103+
)
103104
session.commit()
104105
session.close()
105106

registry/search.py renamed to docker_registry/search.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import flask
22

3-
import config
4-
import lib.index as index
3+
from .lib import config
4+
from .lib import index
55

66
from . import toolkit
77
from .app import app

0 commit comments

Comments
 (0)