summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDarryl Green <darryl.green@arm.com>2018-03-15 10:12:06 +0000
committerDarryl Green <darryl.green@arm.com>2018-03-15 13:53:58 +0000
commita6f430f5778c606b15e16dc5843d5519c78a3ae3 (patch)
tree8f291eefbecaa552d7e0a633d4d15bf964236013 /scripts
parent127c5affce7b419afc9eb9f4a5c37ecdf3498e67 (diff)
Fix current directory check
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/abi_check.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/abi_check.py b/scripts/abi_check.py
index f9fb7f65..98d8be42 100755
--- a/scripts/abi_check.py
+++ b/scripts/abi_check.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
#
-# This file is part of mbed TLS (https://tls.mbed.org)
+# This file is part of Mbed TLS (https://tls.mbed.org)
#
# Copyright (c) 2018, Arm Limited, All Rights Reserved
#
@@ -42,7 +42,9 @@ class AbiChecker(object):
self.make_command = "make"
def check_repo_path(self):
- if not __file__ == os.path.join(".", "scripts", "abi_check.py"):
+ current_dir = os.path.realpath('.')
+ root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+ if current_dir != root_dir:
raise Exception("Must be run from Mbed TLS root")
def setup_logger(self):
@@ -230,8 +232,8 @@ def run_main():
)
return_code = abi_check.check_for_abi_changes()
sys.exit(return_code)
- except Exception as error:
- traceback.print_exc(error)
+ except Exception:
+ traceback.print_exc()
sys.exit(2)