[POT] Handle exception (#9405)

This commit is contained in:
Liubov Talamanova 2021-12-24 12:34:23 +03:00 committed by GitHub
parent 5da7a1119c
commit bc5da8d522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ def generate_pot_version():
branch_name = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode()
commit_hash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode()
return "custom_{}_{}".format(branch_name, commit_hash)
except (subprocess.CalledProcessError, FileNotFoundError):
except Exception: # pylint:disable=W0703
return "unknown version"

View File

@ -19,7 +19,7 @@ def generate_pot_version():
branch_name = subprocess.check_output(["git", "rev-parse", "--abbrev-ref", "HEAD"]).strip().decode()
commit_hash = subprocess.check_output(["git", "rev-parse", "HEAD"]).strip().decode()
return "custom_{}_{}".format(branch_name, commit_hash)
except (subprocess.CalledProcessError, FileNotFoundError):
except Exception: # pylint:disable=W0703
return "unknown version"