Merge lp:~fginther/adt-continuous-deployer/collect-fixes into lp:adt-continuous-deployer

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 13
Merged at revision: 13
Proposed branch: lp:~fginther/adt-continuous-deployer/collect-fixes
Merge into: lp:adt-continuous-deployer
Diff against target: 14 lines (+4/-1)
1 file modified
cd.py (+4/-1)
To merge this branch: bzr merge lp:~fginther/adt-continuous-deployer/collect-fixes
Reviewer Review Type Date Requested Status
Celso Providelo (community) Approve
Review via email: mp+253302@code.launchpad.net

Commit message

Handle comments and '@' directives in collect files.

Description of the change

Handle comments and '@' directives in collect files.

Found this while trying to deploy a mojo spec with collect files such as:

# Basenode mappings
ubuntu/exec.d @
ubuntu/exec.d/basenode lp:basenode

To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cd.py'
2--- cd.py 2015-03-09 11:19:54 +0000
3+++ cd.py 2015-03-18 02:17:28 +0000
4@@ -38,7 +38,10 @@
5 generator of them.'''
6
7 for line in contents.split('\n'):
8- match = re.search('\s(\S*)$', line)
9+ # Ignore comments
10+ if line.startswith('#'):
11+ continue
12+ match = re.search('\s(lp:\S*)$', line)
13 if match:
14 yield match.group(1)
15

Subscribers

People subscribed via source and target branches

to all changes: