From 111c113ff7b4c07639c3ff04116e7840a81cc847 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 25 Oct 2012 17:21:20 -0400 Subject: [PATCH] project|(vcs:utils): convert unicode() -> str(). --- update_copyright/project.py | 6 +++--- update_copyright/vcs/utils.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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 -- 2.26.2