Code review comment for lp:~clint-fewbar/pyjuju/0.6.1-maas-constraints

Clint Byrum (clint-fewbar) wrote :

Reviewers: mp+132917_code.launchpad.net,

Message:
Please take a look.

Description:
Stable backport of bug fix for maas constraints

Stable backport of bug fix for maas constraints

https://code.launchpad.net/~clint-fewbar/juju/0.6.1-maas-constraints/+merge/132917

(do not edit description out of merge proposal)

Please review this at https://codereview.appspot.com/6815082/

Affected files:
   A [revision details]
   M juju/providers/maas/provider.py

Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision: <email address hidden>
+New revision: <email address hidden>

Index: juju/providers/maas/provider.py
=== modified file 'juju/providers/maas/provider.py'
--- juju/providers/maas/provider.py 2012-09-28 11:50:35 +0000
+++ juju/providers/maas/provider.py 2012-11-05 15:54:50 +0000
@@ -37,9 +37,10 @@
      def convert(self, tag_expression):
          """Extract set of names in tag_expression checking they all
exist"""
          tags = set()
+ stripped_expression = tag_expression
          for c in (",", "&", "|", "!"):
- tag_expression = tag_expression.replace(c, " ")
- for word in tag_expression.strip().split():
+ stripped_expression = stripped_expression.replace(c, " ")
+ for word in stripped_expression.strip().split():
              tag = word.lower()
              if tag not in self.tag_names:
                  raise ValueError("tag %r does not exist" % (tag,))

« Back to merge proposal