~mvo/update-manager/not-automatic

« back to all changes in this revision

Viewing changes to UpdateManager/Core/MetaRelease.py

  • Committer: Michael Vogt
  • Date: 2009-01-28 14:44:04 UTC
  • Revision ID: michael.vogt@ubuntu.com-20090128144404-9t55gyjjq3nubgr6
* UpdateManager/Core/MyCache.py:
  - fix crash when no changelog can be found (LP: #320894)
* UpdateManager/Core/MetaRelease.py:
  - do not crash on disk full (LP: #321872)

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
                    os.unlink(self.METARELEASE_FILE)
237
237
                except OSError,e:
238
238
                    print "Can't unlink '%s' (%s)" % (self.METARELEASE_FILE,e)
239
 
            f=open(self.METARELEASE_FILE,"w+")
240
 
            for line in uri.readlines():
241
 
                f.write(line)
242
 
            f.flush()
243
 
            f.seek(0,0)
244
 
            self.metarelease_information=f
 
239
            # we may get excpetion here on e.g. disk full
 
240
            try:
 
241
                f=open(self.METARELEASE_FILE,"w+")
 
242
                for line in uri.readlines():
 
243
                    f.write(line)
 
244
                f.flush()
 
245
                f.seek(0,0)
 
246
                self.metarelease_information=f
 
247
            except IOError, e:
 
248
                pass
245
249
            uri.close()
246
250
        except urllib2.URLError:
247
251
            if os.path.exists(self.METARELEASE_FILE):