# Copyright (c) 1999-2001 Jason Gunthorpe <jgg@debian.org>
+# Copyright (c) 2005 Joey Schulze <joey@infodrom.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# pgp2 encrypting mode.
import string, mimetools, multifile, sys, StringIO, os, tempfile, re;
-import rfc822, time, fcntl, FCNTL, anydbm
+import rfc822, time, fcntl, anydbm
# General GPG options
GPGPath = "gpg"
Owner = "";
KeyID = "";
Hits = {};
+
+ dir = os.path.expanduser("~/.gnupg")
+ if not os.path.isdir(dir):
+ os.mkdir(dir, 0700)
+
try:
Strm = os.popen(string.join(Args," "),"r");
class ReplayCache:
def __init__(self,Database):
self.Lock = open(Database + ".lock","w",0600);
- fcntl.flock(self.Lock.fileno(),FCNTL.LOCK_EX);
+ fcntl.flock(self.Lock.fileno(),fcntl.LOCK_EX);
self.DB = anydbm.open(Database,"c",0600);
self.CleanCutOff = CleanCutOff;
self.AgeCutOff = AgeCutOff;