handle invalid extension

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-07-01 18:59:20 +02:00
parent 22d01c7e6e
commit e08bdaf76b
4 changed files with 6 additions and 4 deletions
+3
View File
@@ -148,6 +148,9 @@ class Extension:
self.mtime = "2000-01-01T00:00Z"
self.ctime = "2000-01-01T00:00Z"
def __str__(self):
return f'Extension(name="{self.name}", path="{self.path}", enabled={self.enabled}, is_builtin={self.is_builtin}, status="{self.status}", can_update={self.can_update}, commit_hash="{self.commit_hash}", commit_date={self.commit_date}, version="{self.version}", description="{self.description}", branch="{self.branch}", remote="{self.remote}", mtime="{self.mtime}", ctime="{self.ctime}")'
def read_info(self, force=False):
if self.have_info_from_repo and not force:
return
+1 -1
View File
@@ -160,7 +160,7 @@ def install_extension_from_url(dirname, url, branch_name, search_text, sort_colu
if os.path.exists(target_dir):
log.error(f'Extension: path="{target_dir}" directory already exists')
return ['', '']
if any(normalize_git_url(x.remote) == url for x in extensions.extensions):
if any(normalize_git_url(x.remote) == url for x in extensions.extensions if x.remote is not None):
return ['', "Extension with this URL is already installed"]
tmpdir = os.path.join(paths.data_path, "tmp", dirname)
try: