mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 04:26:44 +00:00
PEP fixes
This commit is contained in:
parent
084f9d5444
commit
ca8df60d00
@ -97,7 +97,7 @@ def get_git_log(path):
|
|||||||
from plugin import registry
|
from plugin import registry
|
||||||
|
|
||||||
output = None
|
output = None
|
||||||
if registry.git_is_modern:
|
if registry.git_is_modern:
|
||||||
path = path.replace(os.path.dirname(settings.BASE_DIR), '')[1:]
|
path = path.replace(os.path.dirname(settings.BASE_DIR), '')[1:]
|
||||||
command = ['git', 'log', '-n', '1', "--pretty=format:'%H%n%aN%n%aE%n%aI%n%f%n%G?%n%GK'", '--follow', '--', path]
|
command = ['git', 'log', '-n', '1', "--pretty=format:'%H%n%aN%n%aE%n%aI%n%f%n%G?%n%GK'", '--follow', '--', path]
|
||||||
try:
|
try:
|
||||||
@ -112,9 +112,10 @@ def get_git_log(path):
|
|||||||
|
|
||||||
return {'hash': output[0], 'author': output[1], 'mail': output[2], 'date': output[3], 'message': output[4], 'verified': output[5], 'key': output[6]}
|
return {'hash': output[0], 'author': output[1], 'mail': output[2], 'date': output[3], 'message': output[4], 'verified': output[5], 'key': output[6]}
|
||||||
|
|
||||||
|
|
||||||
def check_git_version():
|
def check_git_version():
|
||||||
"""returns if the current git version supports modern features"""
|
"""returns if the current git version supports modern features"""
|
||||||
|
|
||||||
# get version string
|
# get version string
|
||||||
try:
|
try:
|
||||||
output = str(subprocess.check_output(['git', '--version'], cwd=os.path.dirname(settings.BASE_DIR)), 'utf-8')
|
output = str(subprocess.check_output(['git', '--version'], cwd=os.path.dirname(settings.BASE_DIR)), 'utf-8')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user