From: Cory Johns Date: Fri, 3 Mar 2017 16:30:49 +0000 (-0500) Subject: Improve constraints parsing for empty values X-Git-Tag: 0.4.0~16^2~3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=2a32f7b8c506dfafbe137fbe4da43c66cc3a1079;p=osm%2FN2VC.git Improve constraints parsing for empty values --- 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: