[jhbuild] do not crash if there is no "triggers" directory
- From: Craig Keogh <cskeogh src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] do not crash if there is no "triggers" directory
- Date: Fri, 8 Jun 2012 11:17:12 +0000 (UTC)
commit f1ac37e0063eae9d5e221a6fdc3be6ee930d26f9
Author: Marcin Wojdyr <wojdyr gmail com>
Date: Sun May 6 16:27:33 2012 +0100
do not crash if there is no "triggers" directory
(can be useful for projects that do not need triggers)
jhbuild/utils/trigger.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/utils/trigger.py b/jhbuild/utils/trigger.py
index 3aa91f1..dbc74eb 100644
--- a/jhbuild/utils/trigger.py
+++ b/jhbuild/utils/trigger.py
@@ -77,6 +77,8 @@ should be run."""
return ['/bin/sh', self._file]
def load_all(dirpath):
+ if not os.path.isdir(dirpath):
+ return []
result = []
for filename in os.listdir(dirpath):
if not filename.endswith(Trigger.SUFFIX):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]