def recordManifest(self):
        """
            Records the list of currently installed troves to a file

        """
        if self.cfg.root == ':memory:' or self.cfg.dbPath == ':memory:':
            return
        manifest = sorted(x % '%s=%s[%s]\n' for x in self.db.iterAllTroves())
        manifestPath = util.joinPaths(self.cfg.root, self.cfg.dbPath, 'manifest')
        fd, tmpfile = tempfile.mkstemp(dir=os.path.dirname(manifestPath),
                                       prefix='.manifest.')
        try:
            os.write(fd, ''.join(manifest))
            os.close(fd)
            os.rename(tmpfile, manifestPath)
        except Exception:
            if os.path.exists(tmpfile):
                os.remove(tmpfile)
            raise
dataset/ETHPy150Open sassoftware/conary/conary/conaryclient/update.py/ClientUpdate.recordManifest/swapped operands of `%`