From 2a32f7b8c506dfafbe137fbe4da43c66cc3a1079 Mon Sep 17 00:00:00 2001 From: Cory Johns Date: Fri, 3 Mar 2017 11:30:49 -0500 Subject: [PATCH] Improve constraints parsing for empty values --- juju/constraints.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/juju/constraints.py b/juju/constraints.py index c551883..998862d 100644 --- a/juju/constraints.py +++ b/juju/constraints.py @@ -39,10 +39,7 @@ def parse(constraints): and key value pairs joined by an '='. """ - if constraints is None: - return None - - if constraints == "": + if not constraints: return None if type(constraints) is dict: -- 2.25.1