~brian-murray/update-manager/no-i386-upgrade

« back to all changes in this revision

Viewing changes to UpdateManager/Core/MetaRelease.py

  • Committer: Balint Reczey
  • Date: 2018-09-27 14:38:14 UTC
  • mfrom: (2840.1.2 master)
  • Revision ID: balint.reczey@canonical.com-20180927143814-5fvlc75l5cze5269
MergeĀ lp:~rbalint/update-manager/fix-pep8-cosmic

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
            # sometime there is a root owned meta-relase file
345
345
            # there, try to remove it so that we get it
346
346
            # with proper permissions
347
 
            if (os.path.exists(self.METARELEASE_FILE) and
348
 
                    not os.access(self.METARELEASE_FILE, os.W_OK)):
 
347
            if (os.path.exists(self.METARELEASE_FILE) \
 
348
                    and not os.access(self.METARELEASE_FILE, os.W_OK)):
349
349
                try:
350
350
                    os.unlink(self.METARELEASE_FILE)
351
351
                except OSError as e:
381
381
            try:
382
382
                self.parse()
383
383
            except Exception as e:
384
 
                logging.exception("parse failed for '%s'" %
385
 
                                  self.METARELEASE_FILE)
 
384
                logging.exception("parse failed for '%s'" \
 
385
                                  % self.METARELEASE_FILE)
386
386
                # no use keeping a broken file around
387
387
                os.remove(self.METARELEASE_FILE)
388
388
            # we don't want to keep a meta-release file around when it