return pid as int or 0
(self)
| 206 | os.remove(self.pidfile) |
| 207 | |
| 208 | def checkPidFile(self): |
| 209 | """ return pid as int or 0""" |
| 210 | if os.path.isfile(self.pidfile): |
| 211 | f = open(self.pidfile, "rb") |
| 212 | pid = f.read().strip() |
| 213 | f.close() |
| 214 | if pid: |
| 215 | pid = int(pid) |
| 216 | return pid |
| 217 | |
| 218 | return 0 |
| 219 | |
| 220 | def isAlreadyRunning(self): |
| 221 | pid = self.checkPidFile() |
no test coverage detected