diff options
author | Guido Guenther <agx@sigxcpu.org> | 2008-08-12 18:36:21 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2008-08-12 18:36:21 +0200 |
commit | 277581c61659b9f9bb70de564a59c3112131c667 (patch) | |
tree | a212082ccbcacd2f2253e65111e00b19b3d9e8d8 | |
parent | 32b2e89565f9c37bd3f3c40c77b5c19c5b1f0e2b (diff) |
don't fail import on non rfc822 adresses
in the dsc file
Closes: #494753
-rwxr-xr-x | git-import-dsc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/git-import-dsc b/git-import-dsc index e82af2c..018dbda 100755 --- a/git-import-dsc +++ b/git-import-dsc @@ -82,12 +82,14 @@ def apply_debian_patch(src, dirs, options): os.chmod('debian/rules', 0755) if not repo.is_clean()[0]: dch = parse_changelog('debian/changelog') + env = { 'GIT_AUTHOR_DATE': rfc822_date_to_git(dch['Date']) } + name, addr = parseaddr(dch['Maintainer']) - env = { - 'GIT_AUTHOR_NAME': name, - 'GIT_AUTHOR_EMAIL': addr, - 'GIT_AUTHOR_DATE': rfc822_date_to_git(dch['Date']), - } + if name and addr: + env['GIT_AUTHOR_NAME'] = name + env['GIT_AUTHOR_EMAIL'] = addr + else: + print >>sys.stderr, "Warning: failed to parse maintainer" gbpc.GitCommitAll(extra_env=env)(msg="Imported Debian patch %s" % version) else: print "Nothing to commit, nothing imported." |