public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb/gdb-9-branch] gdb/copyright.py: Exit if run from the wrong directory
@ 2020-01-05  5:46 Joel Brobecker
  0 siblings, 0 replies; only message in thread
From: Joel Brobecker @ 2020-01-05  5:46 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1458b0f311cb7eb206a87b4317f3787afa19558b

commit 1458b0f311cb7eb206a87b4317f3787afa19558b
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Wed Jan 1 10:32:20 2020 +0400

    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.
    
    (cherry picked from commit 5fb651f2ddd54a1d3da6fcd172d9fab81893bbf9)

Diff:
---
 gdb/ChangeLog    | 4 ++++
 gdb/copyright.py | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4a1d5dd..f1cb529 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
 2020-01-01  Joel Brobecker  <brobecker@adacore.com>
 
+	* copyright.py (main): Exit if run from the wrong directory.
+
+2020-01-01  Joel Brobecker  <brobecker@adacore.com>
+
 	* top.c (print_gdb_version): Change copyright year to 2020.
 
 2019-12-26  Christian Biesinger  <cbiesinger@google.com>
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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-01-05  5:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-05  5:46 [binutils-gdb/gdb-9-branch] gdb/copyright.py: Exit if run from the wrong directory Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).