mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 09:55:28 +00:00
Suppress dulwich warnings (#12163)
- Prevent erroneous dulwich warning messages
This commit is contained in:
1 parent
9706bc672a
commit
0b5db2f16a
2 files changed
+5
No files matched your search
@@ -55,6 +55,10 @@ try:
|
|||||||
except (KeyError, IndexError):
|
except (KeyError, IndexError):
|
||||||
logger.warning('INVE-W1: Current branch could not be detected.')
|
logger.warning('INVE-W1: Current branch could not be detected.')
|
||||||
main_branch = None
|
main_branch = None
|
||||||
|
|
||||||
|
if main_repo is not None:
|
||||||
|
main_repo.close()
|
||||||
|
main_repo = None
|
||||||
except ImportError:
|
except ImportError:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'INVE-W2: Dulwich module not found, git information will not be available.'
|
'INVE-W2: Dulwich module not found, git information will not be available.'
|
||||||
|
|||||||
@@ -147,6 +147,7 @@ def get_git_log(path):
|
|||||||
datetime.datetime.fromtimestamp(commit.author_time).isoformat(),
|
datetime.datetime.fromtimestamp(commit.author_time).isoformat(),
|
||||||
commit.message.decode().split('\n')[0],
|
commit.message.decode().split('\n')[0],
|
||||||
]
|
]
|
||||||
|
repo.close()
|
||||||
except KeyError:
|
except KeyError:
|
||||||
logger.debug('No HEAD tag found in git repo at path %s', path)
|
logger.debug('No HEAD tag found in git repo at path %s', path)
|
||||||
except NotGitRepository:
|
except NotGitRepository:
|
||||||
|
|||||||
Reference in new issue
Block a user