summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-02-02 16:36:07 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-02-02 16:36:07 +0000
commit527fa203685fc8c93f6094f8cfe61ff4a39f1e2e (patch)
treeb069aea5fcb4896f77d399f2ef704053cbc8c480
parent37f6b4fad26d66e41df55a9531ed73a89a7524ae (diff)
downloadbcfg2-527fa203685fc8c93f6094f8cfe61ff4a39f1e2e.tar.gz
bcfg2-527fa203685fc8c93f6094f8cfe61ff4a39f1e2e.tar.bz2
bcfg2-527fa203685fc8c93f6094f8cfe61ff4a39f1e2e.zip
Packages bug fix
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5054 ce84e21b-d406-0410-9b95-82705330c041
-rw-r--r--src/lib/Server/Plugins/Packages.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py
index e8eaea557..c80217861 100644
--- a/src/lib/Server/Plugins/Packages.py
+++ b/src/lib/Server/Plugins/Packages.py
@@ -5,6 +5,7 @@ import Bcfg2.Server.Plugin
# build sources.list?
# caching
# pinning
+# multi apt-source from xml
def apt_source_from_xml(xsource):
ret = dict()
@@ -43,7 +44,11 @@ class APTSource(object):
bin = [x for x in fname.split('_') if x.startswith('binary-')][0][7:]
if bin not in bdeps:
bdeps[bin] = dict()
- reader = gzip.GzipFile(fname)
+ try:
+ reader = gzip.GzipFile(fname)
+ except:
+ print "failed to read file %s" % fname
+ continue
for line in reader.readlines():
words = line.strip().split(':', 1)
if words[0] == 'Package':