From be934a26fe2ea55aca46dbc7cf027f028499fb0e Mon Sep 17 00:00:00 2001 From: ircnet Date: Sat, 12 Mar 2011 22:51:51 +0000 Subject: [PATCH] Fix two bugs in asset_ilines.py - use .wrap, not .fill when printing AS-SET - fix a bug when one does not add '-l' (LOCAL) asns, populate the LOCAL as-set with a string, not an int. git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@58 c5d60b8d-fdcb-4146-b734-af4215e9eb71 --- cron/ripedb_ilines_update.cron | 2 +- ripedb/asset_ilines.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cron/ripedb_ilines_update.cron b/cron/ripedb_ilines_update.cron index c3f86f3..c797327 100644 --- a/cron/ripedb_ilines_update.cron +++ b/cron/ripedb_ilines_update.cron @@ -73,7 +73,7 @@ function bitcron_main() do_asn $ASN_LIST 250 1300 || error "ilines.asn.conf failed" echo "Gathering I-Lines for AS-SETs" - do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX 300 1300 || error "ilines.as-set.conf failed" + do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX,AS-BIT 300 1300 || error "ilines.as-set.conf failed" if [ $ERR -eq 0 ]; then echo "This is what we've got:" diff --git a/ripedb/asset_ilines.py b/ripedb/asset_ilines.py index 97c1f38..8864e07 100755 --- a/ripedb/asset_ilines.py +++ b/ripedb/asset_ilines.py @@ -99,7 +99,7 @@ def main(): "AS-IP-MAN-PEERING-SWISSIX"] _class = 200 _output = None - _asns = [20932] + _asns = ['20932'] for o,a in opts: if o == "-h" or o == "-help": @@ -177,7 +177,7 @@ def main(): for _asset in _data['as-set']: ofile.write("# %s:\n# %s\n" % - (_asset, "\n# ".join(textwrap.fill( + (_asset, "\n# ".join(textwrap.wrap( ', '.join(_data['as-set'][_asset]))))) ofile.write("#\n\n")