diff --git a/modules/extensions.py b/modules/extensions.py index 5064f1357..0df9681e6 100644 --- a/modules/extensions.py +++ b/modules/extensions.py @@ -60,8 +60,11 @@ class Extension: self.remote = next(repo.remote().urls, None) head = repo.head.commit self.commit_date = repo.head.commit.committed_date - if repo.active_branch: - self.branch = repo.active_branch.name + try: + if repo.active_branch: + self.branch = repo.active_branch.name + except Exception: + pass self.commit_hash = head.hexsha self.version = f"

{self.commit_hash[:8]}

{datetime.fromtimestamp(self.commit_date).strftime('%a %b%d %Y %H:%M')}

" except Exception as ex: