Merge lp:~clint-fewbar/pyjuju/0.6.1-maas-constraints into lp:pyjuju/0.6

Proposed by Clint Byrum on 2012-11-05
Status: Merged
Approved by: Martin Packman on 2012-11-05
Approved revision: 595
Merged at revision: 595
Proposed branch: lp:~clint-fewbar/pyjuju/0.6.1-maas-constraints
Merge into: lp:pyjuju/0.6
Diff against target: 16 lines (+3/-2)
1 file modified
juju/providers/maas/provider.py (+3/-2)
To merge this branch: bzr merge lp:~clint-fewbar/pyjuju/0.6.1-maas-constraints
Reviewer Review Type Date Requested Status
Martin Packman (community) 2012-11-05 Approve on 2012-11-05
Review via email: mp+132917@code.launchpad.net

Description of the change

Stable backport of bug fix for maas constraints

Stable backport of bug fix for maas constraints

https://codereview.appspot.com/6815082/

To post a comment you must log in.
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,))

Martin Packman (gz) wrote :

Thanks for tidying this up, the patch will need dropping in the packaging and bug 1068566 needs to be backported too (I can do that).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'juju/providers/maas/provider.py'
2--- juju/providers/maas/provider.py 2012-09-28 11:50:35 +0000
3+++ juju/providers/maas/provider.py 2012-11-05 16:01:20 +0000
4@@ -37,9 +37,10 @@
5 def convert(self, tag_expression):
6 """Extract set of names in tag_expression checking they all exist"""
7 tags = set()
8+ stripped_expression = tag_expression
9 for c in (",", "&", "|", "!"):
10- tag_expression = tag_expression.replace(c, " ")
11- for word in tag_expression.strip().split():
12+ stripped_expression = stripped_expression.replace(c, " ")
13+ for word in stripped_expression.strip().split():
14 tag = word.lower()
15 if tag not in self.tag_names:
16 raise ValueError("tag %r does not exist" % (tag,))

Subscribers

People subscribed via source and target branches

to all changes: