[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [fallback-scripts/master] generate/lookup: Use consistent exit statuses



commit bc07c9b85ebbf9d917f8d6298c0d9e022e48bbec
Author: teor <teor@xxxxxxxxxxxxxx>
Date:   Mon Jan 20 15:24:58 2020 +1000

    generate/lookup: Use consistent exit statuses
    
    Part of 32959.
---
 generateFallbackDirLine.py  | 2 +-
 lookupFallbackDirContact.py | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/generateFallbackDirLine.py b/generateFallbackDirLine.py
index 1766674..cad9e83 100755
--- a/generateFallbackDirLine.py
+++ b/generateFallbackDirLine.py
@@ -25,7 +25,7 @@ input_list = sys.argv[1:]
 for fingerprint in input_list:
   if not tor_tools.is_valid_fingerprint(fingerprint):
     print("'%s' isn't a valid relay fingerprint" % fingerprint)
-    sys.exit(1)
+    sys.exit(2)
 
 found_list = []
 desc_query = remote.get_server_descriptors(input_list,
diff --git a/lookupFallbackDirContact.py b/lookupFallbackDirContact.py
index d656956..20a7cc7 100755
--- a/lookupFallbackDirContact.py
+++ b/lookupFallbackDirContact.py
@@ -18,14 +18,14 @@ import stem.util.tor_tools as tor_tools
 
 if len(sys.argv) <= 1:
   print("Usage: {} fingerprint ...".format(sys.argv[0]))
-  sys.exit(-1)
+  sys.exit(1)
 
 input_list = sys.argv[1:]
 
 for fingerprint in input_list:
   if not tor_tools.is_valid_fingerprint(fingerprint):
     print("'%s' isn't a valid relay fingerprint" % fingerprint)
-    sys.exit(1)
+    sys.exit(2)
 
 found_list = []
 # we need descriptors, because the consensus does not have contact infos

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits