From 92301f7451925ecbbd13cedd49bf342d6915a5cf Mon Sep 17 00:00:00 2001 From: Peter Oliver Date: Sun, 10 Jul 2016 23:22:03 +0100 Subject: [PATCH] Handle empty IPS publishers (#2047) It turns out it's possible to set up a publisher with no URIs. Handle this gracefully. --- packaging/os/pkg5_publisher.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/os/pkg5_publisher.py b/packaging/os/pkg5_publisher.py index 08c33464e7f..79eccd2ec08 100644 --- a/packaging/os/pkg5_publisher.py +++ b/packaging/os/pkg5_publisher.py @@ -180,13 +180,14 @@ def get_publishers(module): publishers[name]['origin'] = [] publishers[name]['mirror'] = [] - publishers[name][values['type']].append(values['uri']) + if values['type'] is not None: + publishers[name][values['type']].append(values['uri']) return publishers def unstringify(val): - if val == "-": + if val == "-" or val == '': return None elif val == "true": return True