Stringify package name before calling pkgdb

If python-bugzilla hands us back unicode, we'll have the package name in
a unicode string (even though it will only ever have ascii characters).
Passing this to python-fedora causes pycurl to blow
up.
This commit is contained in:
Jason Tibbitts 2011-04-29 11:02:19 -05:00
parent 15b389eeb5
commit 9965e2d3d1

View file

@ -132,7 +132,8 @@ def encode_utf8(object, encoding='utf8', errors='replace'):
def add_package(pkgdb, request):
for retry in range(1, config['pkgdb.retries'] + 1):
try:
pkgdb.add_package(pkg=request['pkg'],
# Note: must stringify the pkg; it blows up with unicode
pkgdb.add_package(pkg=str(request['pkg']),
owner=request['owner'],
description=request['description'],
branches=request['branches'],