From: W. Trevor King Date: Tue, 13 Nov 2012 15:05:13 +0000 (-0500) Subject: project: don't explicitly convert configured options to unicode strings X-Git-Tag: v0.5~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c68cca1b4670e8e4c8c601b3c1e0c14ce1424a4;p=update-copyright.git project: don't explicitly convert configured options to unicode strings Python 3's ConfigParser does this for us. --- diff --git a/update_copyright/project.py b/update_copyright/project.py index 9c4849e..f76a95c 100644 --- a/update_copyright/project.py +++ b/update_copyright/project.py @@ -136,14 +136,12 @@ class Project (object): else: self._pyfile = _os_path.join(self._root, pyfile) - def _load_author_hacks_conf(self, parser, encoding=None): - if encoding is None: - encoding = self._encoding or _utils.ENCODING + def _load_author_hacks_conf(self, parser): author_hacks = {} for path in parser.options('author-hacks'): authors = parser.get('author-hacks', path) author_hacks[tuple(path.split('/'))] = set( - str(a.strip(), encoding) for a in authors.split('|')) + a.strip() for a in authors.split('|')) self._author_hacks = author_hacks if self._vcs is not None: self._vcs._author_hacks = self._author_hacks @@ -157,15 +155,12 @@ class Project (object): if self._vcs is not None: self._vcs._year_hacks = self._year_hacks - def _load_aliases_conf(self, parser, encoding=None): - if encoding is None: - encoding = self._encoding or _utils.ENCODING + def _load_aliases_conf(self, parser): aliases = {} for author in parser.options('aliases'): _aliases = parser.get('aliases', author) - author = str(author, encoding) aliases[author] = set( - str(a.strip(), encoding) for a in _aliases.split('|')) + a.strip() for a in _aliases.split('|')) self._aliases = aliases if self._vcs is not None: self._vcs._aliases = self._aliases