~gary-lasker/software-center/installed-pane-refresh

« back to all changes in this revision

Viewing changes to utils/expunge-cache.py

  • Committer: Michael Vogt
  • Date: 2012-03-22 09:14:01 UTC
  • mfrom: (2907.2.1 software-center)
  • Revision ID: michael.vogt@ubuntu.com-20120322091401-j92t6wcw135qic9u
mergedĀ lp:~gary-lasker/software-center/fix-crash-lp960742

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
            print "Would delete: %s" % f
26
26
        else:
27
27
            logging.debug("Deleting: %s" % f)
28
 
            os.unlink(f)
 
28
            try:
 
29
                os.unlink(f)
 
30
            except OSError as e:
 
31
                logging.warn("When expunging the cache, could not unlink "
 
32
                             "file '%s' (%s)'" % (f, e))
29
33
 
30
34
    def clean(self):
31
35
        # go over the directories