From 7cb9f04972813af90526b835fd89cb6dfb8a5ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 15 Jan 2016 18:09:03 +0200 Subject: [PATCH] Add routes for NetworkManager only if they have been specified --- certidude/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/certidude/cli.py b/certidude/cli.py index 05057cb..7b55e11 100755 --- a/certidude/cli.py +++ b/certidude/cli.py @@ -161,8 +161,9 @@ def certidude_request_spawn(fork): config.set("ipv4", "method", "auto") # Add routes, may need some more tweaking - for index, subnet in enumerate(services.get(endpoint, "route").split(","), start=1): - config.set("ipv4", "route%d" % index, subnet) + if services.has_option(endpoint, "route"): + for index, subnet in enumerate(services.get(endpoint, "route").split(","), start=1): + config.set("ipv4", "route%d" % index, subnet) # Prevent creation of files with liberal permissions os.umask(0o177)