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.77) (envelope-from ) id 1SmUCv-00065H-OX for garchives@archives.gentoo.org; Wed, 04 Jul 2012 18:21:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C928EE0686; Wed, 4 Jul 2012 18:21:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 9BD4FE0684 for ; Wed, 4 Jul 2012 18:21: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 F074C1B40CD for ; Wed, 4 Jul 2012 18:21:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 75F66E5440 for ; Wed, 4 Jul 2012 18:21:09 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1341425488.f10e073c8d8e10ccd5c165a2cdc03a36da0b4470.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/util.py X-VCS-Directories: roverlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: f10e073c8d8e10ccd5c165a2cdc03a36da0b4470 X-VCS-Branch: master Date: Wed, 4 Jul 2012 18:21:09 +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: f8062526-0185-4225-b7ab-650c78ba44f1 X-Archives-Hash: 2bfc64a3437daa75a3b4683c3d74f61e commit: f10e073c8d8e10ccd5c165a2cdc03a36da0b4470 Author: Andr=C3=A9 Erdmann mailerd de> AuthorDate: Wed Jul 4 18:11:28 2012 +0000 Commit: Andr=C3=A9 Erdmann mailerd de> CommitDate: Wed Jul 4 18:11:28 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/R_overlay.git= ;a=3Dcommit;h=3Df10e073c util: remove easylock decorator modified: roverlay/util.py --- roverlay/util.py | 24 ------------------------ 1 files changed, 0 insertions(+), 24 deletions(-) diff --git a/roverlay/util.py b/roverlay/util.py index cf6c018..f66532a 100644 --- a/roverlay/util.py +++ b/roverlay/util.py @@ -11,30 +11,6 @@ from roverlay import config =20 LOGGER =3D logging.getLogger ( 'util' ) =20 -def easylock ( _lock=3Dthreading.Lock() ): - """This decorator locks the function while in use - with either the given Lock or an anonymous threading.Lock. - - arguments: - * _lock -- lock to use, defaults to threading.Lock() - - returns: wrapped function - """ - def wrapper ( f ): - """Wraps the function.""" - def _locked ( *args, **kw ): - """Actual wrapper. - Locks _lock, calls the function and releases _lock in any case.""" - try: - _lock.acquire() - f ( *args, **kw ) - finally: - _lock.release() - return _locked - - return wrapper -# --- end of @easylock () --- - def shorten_str ( s, maxlen, replace_end=3DNone ): if not replace_end is None: rlen =3D maxlen - len ( replace_end )