projects
/
osm
/
N2VC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea587bc
)
Added deprecation notice, and a bit of forwards compatibilty.
author
Pete Vander Giessen
<petevg@gmail.com>
Mon, 28 Nov 2016 21:39:31 +0000
(16:39 -0500)
committer
Pete Vander Giessen
<petevg@gmail.com>
Mon, 28 Nov 2016 21:39:31 +0000
(16:39 -0500)
juju/constraints.py
patch
|
blob
|
history
diff --git
a/juju/constraints.py
b/juju/constraints.py
index
43a80a3
..
43c048a
100644
(file)
--- a/
juju/constraints.py
+++ b/
juju/constraints.py
@@
-11,6
+11,9
@@
# constraints keys are valid, and that we can successfully dump the
# constraints dict to json.
#
+# Once https://bugs.launchpad.net/juju/+bug/1645402 is addressed, this
+# module should be deprecated.
+#
import re
@@
-34,6
+37,10
@@
def parse(constraints):
if constraints is None:
return None
+ if type(constraints) is dict:
+ # Fowards compatibilty: already parsed
+ return constraints
+
constraints = {
normalize_key(k): normalize_value(v) for k, v in [
s.split("=") for s in constraints.split(" ")]}