diff options
-rw-r--r-- | src/lib/Server/Plugins/Packages.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py index 38364fbc8..ee15ba61d 100644 --- a/src/lib/Server/Plugins/Packages.py +++ b/src/lib/Server/Plugins/Packages.py @@ -79,9 +79,14 @@ class Source(object): def update(self): for url in self.urls: - print "updating", url + logger.info("Packages: Updating %s" % url) fname = self.escape_url(url) - data = urllib2.urlopen(url).read() + try: + data = urllib2.urlopen(url).read() + except urllib2.HTTPError, h: + logger.error("Packages: Failed to fetch url %s. code=%s" \ + % (url, h.code)) + continue file(fname, 'w').write(data) def applies(self, metadata): |