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

Commit c459d34

Browse files
author
Olivier Gambier
committed
Fix parameter naming
Docker-DCO-1.1-Signed-off-by: Olivier Gambier <[email protected]> (github: dmp42)
1 parent 8588e1c commit c459d34

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

docker_registry/tags.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
@app.route('/v1/repositories/<path:repository>/properties', methods=['PUT'])
2727
@toolkit.parse_repository_name
2828
@toolkit.requires_auth
29-
def set_properties(namespace, repo):
29+
def set_properties(namespace, repository):
3030
logger.debug("[set_access] namespace={0}; repository={1}".format(namespace,
31-
repo))
31+
repository))
3232
data = None
3333
try:
3434
# Note(dmp): unicode patch
@@ -37,10 +37,12 @@ def set_properties(namespace, repo):
3737
pass
3838
if not data or not isinstance(data, dict):
3939
return toolkit.api_error('Invalid data')
40-
private_flag_path = store.private_flag_path(namespace, repo)
41-
if data['access'] == 'private' and not store.is_private(namespace, repo):
40+
private_flag_path = store.private_flag_path(namespace, repository)
41+
if (data['access'] == 'private'
42+
and not store.is_private(namespace, repository)):
4243
store.put_content(private_flag_path, '')
43-
elif data['access'] == 'public' and store.is_private(namespace, repo):
44+
elif (data['access'] == 'public'
45+
and store.is_private(namespace, repository)):
4446
# XXX is this necessary? Or do we know for sure the file exists?
4547
try:
4648
store.remove(private_flag_path)
@@ -52,10 +54,10 @@ def set_properties(namespace, repo):
5254
@app.route('/v1/repositories/<path:repository>/properties', methods=['GET'])
5355
@toolkit.parse_repository_name
5456
@toolkit.requires_auth
55-
def get_properties(namespace, repo):
57+
def get_properties(namespace, repository):
5658
logger.debug("[get_access] namespace={0}; repository={1}".format(namespace,
57-
repo))
58-
is_private = store.is_private(namespace, repo)
59+
repository))
60+
is_private = store.is_private(namespace, repository)
5961
return toolkit.response({
6062
'access': 'private' if is_private else 'public'
6163
})

0 commit comments

Comments
 (0)