diff --git a/gitlab_deps/deps.py b/gitlab_deps/deps.py index b27a15c2a29d7b7a1ced972a3186952b9a26405d..945e621c75a2ccceade5145ac3aa4f64ed16a49c 100644 --- a/gitlab_deps/deps.py +++ b/gitlab_deps/deps.py @@ -80,7 +80,7 @@ def get_explicit_deps(gl, project_path, branch_name): return [] try: f = p.files.get(file_path='.gitlab-deps', ref=branch_name) - return f.decode().decode('utf-8').split('\n') + return not_null(f.decode().decode('utf-8').split('\n')) except Exception: return [] @@ -104,7 +104,7 @@ _url_rx = re.compile(r'^https?://[^/]+/([^:]+)(:(.*))?$') def url_to_project(url, gitlab_url): m = _url_rx.match(url) - if url.startswith(gitlab_url) and m and m[1] == gitlab_url: + if url.startswith(gitlab_url) and m: return m[1], m[3] or DEFAULT_BRANCH