[121464] users/jmr/delete_old_archives/delete_old_archives.py
jmr at macports.org
jmr at macports.org
Wed Jun 25 18:40:15 PDT 2014
Revision: 121464
https://trac.macports.org/changeset/121464
Author: jmr at macports.org
Date: 2014-06-25 18:40:15 -0700 (Wed, 25 Jun 2014)
Log Message:
-----------
handle portdirs that don't have a currentVersion
Modified Paths:
--------------
users/jmr/delete_old_archives/delete_old_archives.py
Modified: users/jmr/delete_old_archives/delete_old_archives.py
===================================================================
--- users/jmr/delete_old_archives/delete_old_archives.py 2014-06-26 01:22:26 UTC (rev 121463)
+++ users/jmr/delete_old_archives/delete_old_archives.py 2014-06-26 01:40:15 UTC (rev 121464)
@@ -49,7 +49,10 @@
portDirPath = os.path.join(rootDir, portdir)
if os.path.isdir(portDirPath):
for archiveFilename in os.listdir(portDirPath):
- if archiveFilename.endswith('.rmd160') or currentVersions[portdir].match(archiveFilename):
+ try:
+ if archiveFilename.endswith('.rmd160') or currentVersions[portdir].match(archiveFilename):
+ continue
+ except KeyError:
continue
archivePath = os.path.join(portDirPath, archiveFilename)
if os.path.isfile(archivePath):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140625/2f8fd2e5/attachment-0001.html>
More information about the macports-changes
mailing list