def test_make_pid_file_path(): path = unix.make_pid_file_path("testing") assert_equal(path, "/var/run/testing.pid") path = unix.make_pid_file_path("testing", pid_file_path="/var/run/stuff") assert_equal(path, "/var/run/stuff/testing.pid")
def clear_pid(self): try: os.remove(unix.make_pid_file_path(self.name)) except OSError: pass sys.exit(0)