add non-git mode

This commit is contained in:
Vladimir Mandic
2023-12-30 10:51:37 -05:00
parent 84ab19b8a5
commit c8b67d3197
4 changed files with 9 additions and 5 deletions
+4 -1
View File
@@ -57,6 +57,9 @@ class Extension:
else:
try:
self.status = 'unknown'
if len(repo.remotes) == 0:
shared.log.debug(f"Extension: no remotes info repo={self.name}")
return
self.git_name = repo.remotes.origin.url.split('.git')[0].split('/')[-1]
self.description = repo.description
if self.description is None or self.description.startswith("Unnamed repository"):
@@ -72,7 +75,7 @@ class Extension:
self.commit_hash = head.hexsha
self.version = f"<p>{self.commit_hash[:8]}</p><p>{datetime.fromtimestamp(self.commit_date).strftime('%a %b%d %Y %H:%M')}</p>"
except Exception as ex:
shared.log.error(f"Failed reading extension data from Git repository: {self.name}: {ex}")
shared.log.error(f"Extension: failed reading data from git repo={self.name}: {ex}")
self.remote = None
def list_files(self, subdir, extension):