aboutsummaryrefslogtreecommitdiff
path: root/rtr-origin
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2011-04-06 17:59:28 +0000
committerRob Austein <sra@hactrn.net>2011-04-06 17:59:28 +0000
commit797f9b52daca00f8cc18181f55318557709246c0 (patch)
tree0f98cc118810ff9c797ff2457d41efed5db90eed /rtr-origin
parent9c717ab4e3db9efc97aab49caf6a7a68504d6315 (diff)
Do something a little more useful than backtrace if we fail to find
print_roa command. svn path=/rtr-origin/rtr-origin.py; revision=3762
Diffstat (limited to 'rtr-origin')
-rwxr-xr-xrtr-origin/rtr-origin.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/rtr-origin/rtr-origin.py b/rtr-origin/rtr-origin.py
index 42a8739a..259221f0 100755
--- a/rtr-origin/rtr-origin.py
+++ b/rtr-origin/rtr-origin.py
@@ -687,13 +687,16 @@ class axfr_set(prefix_set):
complex stuff for building Python extensions, which is way over
the top for a relying party tool.
"""
- cmd = [print_roa, "-b"]
- cmd.extend(files)
- p = subprocess.Popen(cmd, stdout = subprocess.PIPE)
- for line in p.stdout:
- line = line.split()
- asn = line[0]
- self.extend(prefix.from_text(asn, addr) for addr in line[1:])
+ try:
+ cmd = [print_roa, "-b"]
+ cmd.extend(files)
+ p = subprocess.Popen(cmd, stdout = subprocess.PIPE)
+ for line in p.stdout:
+ line = line.split()
+ asn = line[0]
+ self.extend(prefix.from_text(asn, addr) for addr in line[1:])
+ except OSError, e:
+ sys.exit("Could not run %s, check your $PATH variable? (%s)" % (print_roa, e))
@classmethod
def load(cls, filename):