~ubuntu-branches/ubuntu/saucy/charm-tools/saucy

« back to all changes in this revision

Viewing changes to scripts/proof

  • Committer: Clint Byrum
  • Date: 2012-08-28 19:14:44 UTC
  • mfrom: (1.1.9)
  • Revision ID: clint@ubuntu.com-20120828191444-ka30j1i2wl0chxj6
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
  if 'maintainer' not in charm:
151
151
    err('Charms need a maintainer (See RFC2822) - Name <email>')
152
152
  else:
153
 
    (name, address) = email.utils.parseaddr(charm['maintainer'])
154
 
    formatted = email.utils.formataddr((name, address))
155
 
    if formatted != charm['maintainer']:
156
 
        warn("Maintainer address should contain a real-name and email only. [%s]" % (formatted))
 
153
    if type(charm['maintainer']) == list:  # It's a list
 
154
        maintainers = charm['maintainer']
 
155
    else:
 
156
        maintainers = [charm['maintainer']]
 
157
    for maintainer in maintainers:
 
158
        (name, address) = email.utils.parseaddr(maintainer)
 
159
        formatted = email.utils.formataddr((name, address))
 
160
        if formatted != maintainer:
 
161
            warn("Maintainer address should contain a real-name and email only. [%s]" % (formatted))
157
162
 
158
163
  # Must have a hooks dir
159
164
  if not path.exists(hooks_path):