aboutsummaryrefslogtreecommitdiff
path: root/scripts/whack-ripe-prefixes.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/whack-ripe-prefixes.py')
-rw-r--r--scripts/whack-ripe-prefixes.py36
1 files changed, 19 insertions, 17 deletions
diff --git a/scripts/whack-ripe-prefixes.py b/scripts/whack-ripe-prefixes.py
index 58af6b07..52ea3f18 100644
--- a/scripts/whack-ripe-prefixes.py
+++ b/scripts/whack-ripe-prefixes.py
@@ -1,3 +1,19 @@
+# $Id$
+#
+# Copyright (C) 2010 Internet Systems Consortium ("ISC")
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
"""
Fix problems in prefixes.csv generated from RIPE's database.
@@ -22,25 +38,11 @@ set, as the chance of deadlock would approach 100%, but in this case
we know that the sort program must consume and buffer (somehow) all of
its input before writing a single line of output, so a single script
can safely act as a filter both before and after sort.
-
-$Id$
-
-Copyright (C) 2010 Internet Systems Consortium ("ISC")
-
-Permission to use, copy, modify, and distribute this software for any
-purpose with or without fee is hereby granted, provided that the above
-copyright notice and this permission notice appear in all copies.
-
-THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-PERFORMANCE OF THIS SOFTWARE.
"""
-import sys, subprocess, rpki.ipaddrs
+import sys
+import subprocess
+import rpki.ipaddrs
sorter = subprocess.Popen(("sort", "-T.", "-n"),
stdin = subprocess.PIPE,