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 6F24B1381F3 for ; Fri, 13 Sep 2013 15:10:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 749A9E0BF5; Fri, 13 Sep 2013 15:10:48 +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 B2BDBE0BF2 for ; Fri, 13 Sep 2013 15:10:47 +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 C2C3733ECBD for ; Fri, 13 Sep 2013 15:10:46 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 947C5E5469 for ; Fri, 13 Sep 2013 15:10:44 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1379084567.0a59f1f7b3e34459257d018ca252751a35f66cc2.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/setupscript/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/setupscript/hookenv.py X-VCS-Directories: roverlay/setupscript/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 0a59f1f7b3e34459257d018ca252751a35f66cc2 X-VCS-Branch: master Date: Fri, 13 Sep 2013 15:10:44 +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: 560e5fb1-fa56-4ae1-abe2-447ff8ac3da3 X-Archives-Hash: d6b8da146c02495d005163ed2421fd79 commit: 0a59f1f7b3e34459257d018ca252751a35f66cc2 Author: André Erdmann mailerd de> AuthorDate: Fri Sep 13 15:02:47 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Fri Sep 13 15:02:47 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=0a59f1f7 setupscript/hookenv, --pretend: handle missing files + fix HOOKDIR_SCRIPT_CLS typo --- roverlay/setupscript/hookenv.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/roverlay/setupscript/hookenv.py b/roverlay/setupscript/hookenv.py index ebfe0d1..5ffcbdd 100644 --- a/roverlay/setupscript/hookenv.py +++ b/roverlay/setupscript/hookenv.py @@ -7,7 +7,6 @@ import collections import errno import fnmatch -import itertools import os @@ -180,9 +179,13 @@ class UserHookScript ( HookScriptBase ): ) self.hook_script_fspath = os.path.realpath ( self.fspath ) - self.hook_script_ref = ( - False if not os.path.islink ( self.fspath ) else None - ) + if ( + os.path.islink ( self.fspath ) or not os.path.lexists ( self.fspath ) + ): + self.hook_script_ref = None + else: + self.hook_script_ref = False + self.event = event # --- end of __init__ (...) --- @@ -436,7 +439,7 @@ class UserHookScriptDir ( NestedHookScriptDirBase ): self.scripts [event_name] = subdir # -- end if - entry = self.HOOKDIR_CLS ( link, filename=link_name ) + entry = self.HOOK_SCRIPT_CLS ( link, filename=link_name ) subdir [link_name] = entry else: entry = subdir [link_name]