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 08D6B1381F3 for ; Wed, 15 May 2013 20:16:53 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BF3A5E07E1; Wed, 15 May 2013 20:16:49 +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 57C5CE07E1 for ; Wed, 15 May 2013 20:16:49 +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 6FE9433E091 for ; Wed, 15 May 2013 20:16:48 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id DEADBE5308 for ; Wed, 15 May 2013 20:16:46 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1368648981.a4c5982a60761d68418fc518ad2f8d0695ea6e35.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/archive-conf X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: a4c5982a60761d68418fc518ad2f8d0695ea6e35 X-VCS-Branch: master Date: Wed, 15 May 2013 20:16:46 +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: abf84253-3ffd-4265-a9be-fa03aa353192 X-Archives-Hash: 41ba01d9d2d14d7279e31bcebc05d261 commit: a4c5982a60761d68418fc518ad2f8d0695ea6e35 Author: Vladimir Romanov gmail com> AuthorDate: Wed May 15 20:16:21 2013 +0000 Commit: Zac Medico gentoo org> CommitDate: Wed May 15 20:16:21 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a4c5982a archive-conf: rename vars to avoid builtin names --- bin/archive-conf | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/archive-conf b/bin/archive-conf index 42b6274..f8efcb9 100755 --- a/bin/archive-conf +++ b/bin/archive-conf @@ -19,8 +19,8 @@ sys.path.insert(0, pym_path) import portage portage._internal_caller = True +import portage.dispatch_conf from portage import os -from portage import dispatch_conf FIND_EXTANT_CONTENTS = "find %s -name CONTENTS" @@ -42,12 +42,12 @@ except ImportError: blocksize=32768 data = f.read(blocksize) size = 0 - sum = md5.new() + checksum = md5.new() while data: - sum.update(data) + checksum.update(data) size = size + len(data) data = f.read(blocksize) - return (md5_to_hex(sum.digest()),size) + return (md5_to_hex(checksum.digest()), size) def archive_conf(): args = [] @@ -70,12 +70,12 @@ def archive_conf(): # and see if the current file is unmodified or not. try: todo_cnt = len(args) - for file in content_files: - file = file.rstrip() + for filename in content_files: + filename = filename.rstrip() try: - contents = open(file, "r") + contents = open(filename, "r") except IOError as e: - print('archive-conf: Unable to open %s: %s' % (file, e), file=sys.stderr) + print('archive-conf: Unable to open %s: %s' % (filename, e), file=sys.stderr) sys.exit(1) lines = contents.readlines() for line in lines: