From 5c03bbdc8dc2a94e92384e0a2cd28cc9dd8e313b Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Wed, 25 Apr 2012 13:53:18 +0000 Subject: Clean up old scripts which still imported the rpki.myrpki module. svn path=/trunk/; revision=4454 --- scripts/translate-handles.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'scripts/translate-handles.py') diff --git a/scripts/translate-handles.py b/scripts/translate-handles.py index 68695e38..cdff4b77 100644 --- a/scripts/translate-handles.py +++ b/scripts/translate-handles.py @@ -16,7 +16,7 @@ rewrites them as needed after performing the translation. $Id$ -Copyright (C) 2010 Internet Systems Consortium ("ISC") +Copyright (C) 2010-2012 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 @@ -31,15 +31,17 @@ OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ -import os, sys, rpki.myrpki +import os +import sys +from rpki.csv_utils import csv_reader, csv_writer -translations = dict((src, dst) for src, dst in rpki.myrpki.csv_reader("translations.csv", columns = 2)) +translations = dict((src, dst) for src, dst in csv_reader("translations.csv", columns = 2)) for filename in sys.argv[1:]: - f = rpki.myrpki.csv_writer(filename) + f = csv_writer(filename) - for cols in rpki.myrpki.csv_reader(filename): + for cols in csv_reader(filename): if cols[0] in translations: cols[0] = translations[cols[0]] f.writerow(cols) -- cgit v1.2.3