We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b1da79b + a6d2418 commit 48dd398Copy full SHA for 48dd398
mlc/repo_action.py
@@ -7,6 +7,7 @@
7
import shutil
8
from . import utils
9
from .logger import logger
10
+from urllib.parse import urlparse
11
12
class RepoAction(Action):
13
"""
@@ -85,7 +86,8 @@ def add(self, run_args):
85
86
if not os.path.exists(i_repo_path):
87
#check if its an URL
88
if utils.is_valid_url(i_repo_path):
- if "github.com" in i_repo_path:
89
+ parsed = urlparse(i_repo_path)
90
+ if parsed.hostname == "github.com":
91
res = self.github_url_to_user_repo_format(i_repo_path)
92
if res['return'] > 0:
93
return res
0 commit comments