diff --git a/tools/pot/openvino/tools/pot/version.py b/tools/pot/openvino/tools/pot/version.py index 4ed39f922e4..1b22b50012a 100644 --- a/tools/pot/openvino/tools/pot/version.py +++ b/tools/pot/openvino/tools/pot/version.py @@ -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: + except (subprocess.CalledProcessError, FileNotFoundError): return "unknown version" diff --git a/tools/pot/setup.py b/tools/pot/setup.py index b3114abc090..2c9bc1c3bb8 100644 --- a/tools/pot/setup.py +++ b/tools/pot/setup.py @@ -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: + except (subprocess.CalledProcessError, FileNotFoundError): return "unknown version"