From: W. Trevor King Date: Thu, 25 Oct 2012 21:21:20 +0000 (-0400) Subject: project|(vcs:utils): convert unicode() -> str(). X-Git-Tag: v0.5~12 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=111c113ff7b4c07639c3ff04116e7840a81cc847;p=update-copyright.git project|(vcs:utils): convert unicode() -> str(). --- diff --git a/update_copyright/project.py b/update_copyright/project.py index c7814a8..63b9cfd 100644 --- a/update_copyright/project.py +++ b/update_copyright/project.py @@ -139,7 +139,7 @@ class Project (object): for path in parser.options('author-hacks'): authors = parser.get('author-hacks', path) author_hacks[tuple(path.split('/'))] = set( - unicode(a.strip(), encoding) for a in authors.split('|')) + str(a.strip(), encoding) for a in authors.split('|')) self._author_hacks = author_hacks if self._vcs is not None: self._vcs._author_hacks = self._author_hacks @@ -159,9 +159,9 @@ class Project (object): aliases = {} for author in parser.options('aliases'): _aliases = parser.get('aliases', author) - author = unicode(author, encoding) + author = str(author, encoding) aliases[author] = set( - unicode(a.strip(), encoding) for a in _aliases.split('|')) + str(a.strip(), encoding) for a in _aliases.split('|')) self._aliases = aliases if self._vcs is not None: self._vcs._aliases = self._aliases diff --git a/update_copyright/vcs/utils.py b/update_copyright/vcs/utils.py index b1537c6..9d3c1d4 100644 --- a/update_copyright/vcs/utils.py +++ b/update_copyright/vcs/utils.py @@ -59,9 +59,9 @@ def invoke(args, stdin=None, stdout=_subprocess.PIPE, stderr=_subprocess.PIPE, if encoding is None: encoding = _ENCODING if stdout is not None: - stdout = unicode(stdout, encoding) + stdout = str(stdout, encoding) if stderr is not None: - stderr = unicode(stderr, encoding) + stderr = str(stderr, encoding) if status not in expect: raise ValueError([args, status, stdout, stderr]) return status, stdout, stderr