[Treepkg-commits] r427 - trunk/contrib/sawmill/web
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Thu Sep 9 17:13:37 CEST 2010
Author: teichmann
Date: 2010-09-09 17:13:35 +0200 (Thu, 09 Sep 2010)
New Revision: 427
Modified:
trunk/contrib/sawmill/web/details.py
Log:
check if tracks directory exists before walking it.
Modified: trunk/contrib/sawmill/web/details.py
===================================================================
--- trunk/contrib/sawmill/web/details.py 2010-09-09 14:46:13 UTC (rev 426)
+++ trunk/contrib/sawmill/web/details.py 2010-09-09 15:13:35 UTC (rev 427)
@@ -98,17 +98,18 @@
items = []
tracks_path = os.path.join(path, "tracks")
- for track in os.listdir(tracks_path):
- track_path = os.path.join(tracks_path, track)
- if not os.path.isdir(track_path): continue
- revisions_path = os.path.join(track_path, "pkg")
- if not os.path.isdir(revisions_path): continue
- for revision in os.listdir(revisions_path):
- revision_path = os.path.join(revisions_path, revision)
- if not os.path.isdir(revision_path): continue
- status_file = os.path.join(revision_path, "status")
- if not os.path.isfile(status_file): continue
- items.append(TrackItem(treepkg, track, revision, status_file))
+ if os.path.isdir(track_path):
+ for track in os.listdir(tracks_path):
+ track_path = os.path.join(tracks_path, track)
+ if not os.path.isdir(track_path): continue
+ revisions_path = os.path.join(track_path, "pkg")
+ if not os.path.isdir(revisions_path): continue
+ for revision in os.listdir(revisions_path):
+ revision_path = os.path.join(revisions_path, revision)
+ if not os.path.isdir(revision_path): continue
+ status_file = os.path.join(revision_path, "status")
+ if not os.path.isfile(status_file): continue
+ items.append(TrackItem(treepkg, track, revision, status_file))
return items
More information about the Treepkg-commits
mailing list