From b3ae5c98b3e53e03cea4f168c009cb2bf3afbe81 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 7 May 2016 13:50:37 +0000 Subject: Joy. Randy's trunk/ installation is using an ancient backwards compatability hack which allows irdbd's server host and port to be expressed as a URL. No big deal, except that I wonder how many other relics we're going to find in The Config File That Time Forgot. See #813. svn path=/branches/tk705/; revision=6428 --- potpourri/ca-unpickle.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'potpourri') diff --git a/potpourri/ca-unpickle.py b/potpourri/ca-unpickle.py index a5becda7..3b31e0ba 100755 --- a/potpourri/ca-unpickle.py +++ b/potpourri/ca-unpickle.py @@ -111,13 +111,17 @@ class FixURI(object): port = world.cfg.pubd.server_port) self.new_pubd = fmt(host = cfg.get(section = "pubd", option = "server-host"), port = cfg.get(section = "pubd", option = "server-port")) - self.new_irdbd = fmt(host = world.cfg.irdbd.server_host, - port = world.cfg.irdbd.server_port) - self.new_irdbd = fmt(host = cfg.get(section = "irdbd", option = "server-host"), - port = cfg.get(section = "irdbd", option = "server-port")) self.old_rsyncd = world.cfg.myrpki.publication_rsync_server self.new_rsyncd = cfg.get(section = "myrpki", option = "publication_rsync_server") + self.new_irdbd = fmt(host = cfg.get(section = "irdbd", option = "server-host"), + port = cfg.get(section = "irdbd", option = "server-port")) + try: + self.old_irdbd = fmt(host = world.cfg.irdbd.server_host, + port = world.cfg.irdbd.server_port) + except AttributeError: + u = urlparse.urlparse(world.cfg.irdbd.http_url) + self.old_irdbd = fmt(host = u.hostname, port = u.port) def _fix(self, uri, scheme, old_netloc, new_netloc): u = urlparse.urlparse(uri) -- cgit v1.2.3