parent
3f1d394e14
commit
7cc7e54945
2 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
|||
import urllib
|
||||
import re
|
||||
|
||||
import anunidecode # Don't listen to pylint's lies. This import is required for unidecode below.
|
||||
|
||||
from uuid import uuid4
|
||||
|
||||
REPOSITORY_NAME_REGEX = re.compile(r'^[\.a-zA-Z0-9_-]+$')
|
||||
|
@ -23,6 +25,8 @@ def escape_tag(tag, default='latest'):
|
|||
|
||||
|
||||
def parse_namespace_repository(repository, library_namespace, include_tag=False):
|
||||
repository = repository.encode('unidecode', 'ignore')
|
||||
|
||||
parts = repository.rstrip('/').split('/', 1)
|
||||
if len(parts) < 2:
|
||||
namespace = library_namespace
|
||||
|
|
Reference in a new issue