1. Massimiliano Torromeo
  2. SimpleDaemon


Massimiliano Torromeo  committed bebc3aa

Fix writing strings in pidfile for python3. Python3 only accept buffers or bytestrings in files opened in binary mode.

  • Participants
  • Parent commits 5bd3ac6
  • Branches default

Comments (0)

Files changed (1)

File simpledaemon/base.py

View file
     def write_pid(self):
         """Write to the pid file"""
         if self.pidfile:
-            open(self.pidfile, 'wb').write(str(os.getpid()))
+            open(self.pidfile, 'w').write(str(os.getpid()))
     def remove_pid(self):
         """Delete the pid file"""