Handle exception with version (#9376)
This commit is contained in:
parent
529ab2b099
commit
7e85ada7e4
@ -14,7 +14,7 @@ def generate_pot_version():
|
|||||||
branch_name = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode()
|
branch_name = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode()
|
||||||
commit_hash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode()
|
commit_hash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode()
|
||||||
return "custom_{}_{}".format(branch_name, commit_hash)
|
return "custom_{}_{}".format(branch_name, commit_hash)
|
||||||
except subprocess.CalledProcessError:
|
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||||
return "unknown version"
|
return "unknown version"
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ def generate_pot_version():
|
|||||||
branch_name = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode()
|
branch_name = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode()
|
||||||
commit_hash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode()
|
commit_hash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode()
|
||||||
return "custom_{}_{}".format(branch_name, commit_hash)
|
return "custom_{}_{}".format(branch_name, commit_hash)
|
||||||
except subprocess.CalledProcessError:
|
except (subprocess.CalledProcessError, FileNotFoundError):
|
||||||
return "unknown version"
|
return "unknown version"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user