[Bugs] #1876 UNSP: Failure to cleanup temporary files after filesystem full errors

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Wed Mar 31 05:25:19 EDT 2010

#1876: Failure to cleanup temporary files after filesystem full errors
    Reporter:  bernie                     |          Owner:  tomeu                      
        Type:  defect                     |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar                      |        Version:  0.84.x                     
    Severity:  Critical                   |       Keywords:  sugar-0.84                 
Distribution:  Unspecified                |   Status_field:  Unconfirmed                

Comment(by mtd):

 Do you have the Browse log, by any chance?

 I'm not sure whether Browse or the journal should clean up those datastore
 items; I'm looking at
 http://cgit.sugarlabs.org/browse/mainline/tree/downloadmanager.py#n162 -
 we should probably try to clean up the datastore there.

 This patch should properly handle those errors you logged:

 diff --git a/src/sugar/bundle/bundle.py b/src/sugar/bundle/bundle.py
 index c9763a0..a04c873 100644
 --- a/src/sugar/bundle/bundle.py
 +++ b/src/sugar/bundle/bundle.py
 @@ -72,7 +72,12 @@ class Bundle(object):
          if os.path.isdir(self._path):
              self._zip_file = None
 -            self._zip_file = zipfile.ZipFile(self._path)
 +            try:
 +                self._zip_file = zipfile.ZipFile(self._path)
 +            except (zipfile.error, LargeZipFile), ziperror:
 +                raise MalformedBundleException(
 +                    "Error accessing zip file %s: %s"
 +                    % (self._path, ziperror))

          # manifest = self._get_file(self._infodir + '/contents')

Ticket URL: <https://bugs.sugarlabs.org/ticket/1876#comment:2>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system

More information about the Bugs mailing list