Improve constraints parsing for empty values
authorCory Johns <johnsca@gmail.com>
Fri, 3 Mar 2017 16:30:49 +0000 (11:30 -0500)
committerCory Johns <johnsca@gmail.com>
Fri, 3 Mar 2017 16:33:39 +0000 (11:33 -0500)
juju/constraints.py

index c551883..998862d 100644 (file)
@@ -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: