Commits

Massimiliano Torromeo committed bebc3aa

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

Comments (0)

Files changed (1)

simpledaemon/base.py

     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"""