def write_pidfile(self):
        # Write pidfile
        atexit.register(self.delpid) # Make sure pid file is removed if we quit
        pid = str(os.getpid())
        try:
            fp = open(self.pidfile, 'w+')
            fp.write(str(pid))
            fp.close()
            os.chmod(self.pidfile, 0644)
        except Exception, e:
            msg = self.pidfile % "Unable to write pidfile: %s"
            log.exception(msg)
            sys.stderr.write(msg + "\n")
            sys.exit(1)
dataset/ETHPy150Open serverdensity/sd-agent/daemon.py/Daemon.write_pidfile/swapped operands of `%`