diff options
-rw-r--r-- | host/tests/verify_fbs_test.py | 3 | ||||
-rwxr-xr-x | host/utils/update_fbs.py | 7 |
2 files changed, 7 insertions, 3 deletions
diff --git a/host/tests/verify_fbs_test.py b/host/tests/verify_fbs_test.py index c3ee763e4..261037c4f 100644 --- a/host/tests/verify_fbs_test.py +++ b/host/tests/verify_fbs_test.py @@ -26,7 +26,8 @@ class VerifyFBSTest(unittest.TestCase): spec.loader.exec_module(update_fbs) try: git_exe = update_fbs.find_executable("git") - except RuntimeError: + # pylint: disable=broad-except + except Exception: # No git, no test. We pass b/c git is not a UHD dependency. return sys.argv.append('--verify') diff --git a/host/utils/update_fbs.py b/host/utils/update_fbs.py index 86dc2ca83..4f9c595b0 100755 --- a/host/utils/update_fbs.py +++ b/host/utils/update_fbs.py @@ -108,9 +108,12 @@ def verify(git_exe, uhd_path=None): accompanied by a change of the header. It also detects manual changes to the generated header files. """ + if not git_exe: + print("Cannot verify schema files (no git found), assuming pass") + return True try: - subprocess.check_output(("git", "status"), stderr=subprocess.STDOUT) - except subprocess.CalledProcessError as error: + subprocess.check_output((git_exe, "status"), stderr=subprocess.STDOUT) + except subprocess.CalledProcessError: print("Cannot verify schema files (not a git repo), assuming pass") return True try: |