Complete.Org: Mailing Lists: Archives: offlineimap: July 2008:
[PATCH] Fixed a bug preventing the pid file from being generated.
Home

[PATCH] Fixed a bug preventing the pid file from being generated.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: offlineimap@xxxxxxxxxxxx
Subject: [PATCH] Fixed a bug preventing the pid file from being generated.
From: Ben Willard <benwillard@xxxxxxxxx>
Date: Tue, 1 Jul 2008 21:12:14 -0400

Hi,

I noticed that the pid file was getting created, but was being left
empty.  Seems that os.getPid() was returning an int, but wasn't getting
casted to a string and the exception getting generated was getting
ignored.  This should fix it.

I really like offlineimap, it's a great tool -- thanks for writing it!

Ben Willard

---
 offlineimap/init.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/init.py b/offlineimap/init.py
index ca09919..8485511 100644
--- a/offlineimap/init.py
+++ b/offlineimap/init.py
@@ -133,7 +133,7 @@ def startup(versionno):
 
     try:
         pidfd = open(config.getmetadatadir() + "/pid", "w")
-        pidfd.write(os.getpid())
+        pidfd.write(str(os.getpid()) + "\n")
         pidfd.close()
     except:
         pass
-- 
1.5.5.GIT




[Prev in Thread] Current Thread [Next in Thread]
  • [PATCH] Fixed a bug preventing the pid file from being generated., Ben Willard <=