write unicode values in config file

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1895 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-10-27 19:49:41 +00:00
parent b7f2c0eeab
commit 0aab328355

View file

@ -185,7 +185,10 @@ class MyDistribution (distklass, object):
"contact_email", "fullname")
for name in metanames:
method = "get_" + name
cmd = "%s = %r" % (name, getattr(self.metadata, method)())
val = getattr(self.metadata, method)()
if isinstance(val, str):
val = unicode(val)
cmd = "%s = %r" % (name, val)
data.append(cmd)
# write the config file
data.append('appname = "LinkChecker"')