From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D68531381F3 for ; Fri, 11 Oct 2013 10:33:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B024AE0A0B; Fri, 11 Oct 2013 10:33:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AB15E0A02 for ; Fri, 11 Oct 2013 10:33:13 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 539F233EEE2 for ; Fri, 11 Oct 2013 10:33:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id ECCFDE5460 for ; Fri, 11 Oct 2013 10:33:10 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1381486789.80036cd01dd468d6b5e583b890db90e20c09a585.vapier@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/xattr-helper.py X-VCS-Directories: bin/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 80036cd01dd468d6b5e583b890db90e20c09a585 X-VCS-Branch: master Date: Fri, 11 Oct 2013 10:33:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 54f1f1bb-0dd3-4352-8159-65dd8e3b4f6d X-Archives-Hash: f56ae1bf648902b40a03a9c839e533ec commit: 80036cd01dd468d6b5e583b890db90e20c09a585 Author: Mike Frysinger gentoo org> AuthorDate: Fri Oct 11 10:19:49 2013 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Oct 11 10:19:49 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=80036cd0 xattr-helper: use upper caps for module constants --- bin/xattr-helper.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/xattr-helper.py b/bin/xattr-helper.py index a85309f..6d33017 100755 --- a/bin/xattr-helper.py +++ b/bin/xattr-helper.py @@ -19,8 +19,10 @@ if hasattr(os, "getxattr"): else: import xattr -_unquote_re = re.compile(br'\\[0-7]{3}') -_fs_encoding = sys.getfilesystemencoding() + +_UNQUOTE_RE = re.compile(br'\\[0-7]{3}') +_FS_ENCODING = sys.getfilesystemencoding() + if sys.hexversion < 0x3000000: @@ -29,7 +31,7 @@ if sys.hexversion < 0x3000000: def unicode_encode(s): if isinstance(s, unicode): - s = s.encode(_fs_encoding) + s = s.encode(_FS_ENCODING) return s else: @@ -38,7 +40,7 @@ else: def unicode_encode(s): if isinstance(s, str): - s = s.encode(_fs_encoding) + s = s.encode(_FS_ENCODING) return s def quote(s, quote_chars): @@ -68,7 +70,7 @@ def unquote(s): s_len = len(s) while pos < s_len: - m = _unquote_re.search(s, pos=pos) + m = _UNQUOTE_RE.search(s, pos=pos) if m is None: result.append(s[pos:]) pos = s_len