aboutsummaryrefslogtreecommitdiff
path: root/gdb/copyright.py
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2020-01-01 09:08:08 +0400
committerJoel Brobecker <brobecker@adacore.com>2020-01-01 09:11:56 +0400
commit5fb651f2ddd54a1d3da6fcd172d9fab81893bbf9 (patch)
tree2fe690e9eb44cc3a19490d24dcee6701d8d485da /gdb/copyright.py
parent5dd8bf886a3f7535e0ad8b5218275efcf2cfff31 (diff)
downloadfsf-binutils-gdb-5fb651f2ddd54a1d3da6fcd172d9fab81893bbf9.zip
fsf-binutils-gdb-5fb651f2ddd54a1d3da6fcd172d9fab81893bbf9.tar.gz
fsf-binutils-gdb-5fb651f2ddd54a1d3da6fcd172d9fab81893bbf9.tar.bz2
gdb/copyright.py: Exit if run from the wrong directory
We printed an error, but kept going anyway... ;-) gdb/ChangeLog: * copyright.py (main): Exit if run from the wrong directory.
Diffstat (limited to 'gdb/copyright.py')
-rw-r--r--gdb/copyright.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/copyright.py b/gdb/copyright.py
index 84ead52..7771d9d 100644
--- a/gdb/copyright.py
+++ b/gdb/copyright.py
@@ -34,6 +34,7 @@ import datetime
import os
import os.path
import subprocess
+import sys
def get_update_list():
@@ -143,6 +144,8 @@ def main ():
"""The main subprogram."""
if not os.path.isfile("gnulib/import/extra/update-copyright"):
print "Error: This script must be called from the gdb directory."
+ sys.exit(1)
+
root_dir = os.path.dirname(os.getcwd())
os.chdir(root_dir)