From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QUhP4-00071i-M6 for garchives@archives.gentoo.org; Thu, 09 Jun 2011 15:44:15 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0D38D1C08B; Thu, 9 Jun 2011 15:44:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D491E1C08B for ; Thu, 9 Jun 2011 15:44:05 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5B1961B4022 for ; Thu, 9 Jun 2011 15:44:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 993598003C for ; Thu, 9 Jun 2011 15:44:04 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <6c5f977d943745f1eaa47da89e32b6c8cd49f41c.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/locks.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 6c5f977d943745f1eaa47da89e32b6c8cd49f41c Date: Thu, 9 Jun 2011 15:44:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 8ef6b97576cd6a1be0fb15ba93e58d5a commit: 6c5f977d943745f1eaa47da89e32b6c8cd49f41c Author: Zac Medico gentoo org> AuthorDate: Thu Jun 9 15:43:40 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Jun 9 15:43:40 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3D6c5f977d lockfile: use hasattr() instead of dir() --- pym/portage/locks.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/pym/portage/locks.py b/pym/portage/locks.py index 50a9200..9ed1d6a 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -114,7 +114,7 @@ def lockfile(mypath, wantnewlockfile=3D0, unlinkfile=3D= 0, try: locking_method(myfd, fcntl.LOCK_EX|fcntl.LOCK_NB) except IOError as e: - if "errno" not in dir(e): + if not hasattr(e, "errno"): raise if e.errno in (errno.EACCES, errno.EAGAIN): # resource temp unavailable; eg, someone beat us to the lock.