From: joey <> Date: Sun, 23 Jan 2005 16:00:53 +0000 (+0000) Subject: Create ~/.gnupg if it does not exist since gpg will fail fatally otherwise X-Git-Tag: debian_userdir-ldap_0-3-8~4 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=6730238ac1007b899b87675301db3a01dfece0da Create ~/.gnupg if it does not exist since gpg will fail fatally otherwise --- diff --git a/userdir_gpg.py b/userdir_gpg.py index 9f494fb..455ba3f 100644 --- a/userdir_gpg.py +++ b/userdir_gpg.py @@ -1,4 +1,5 @@ # Copyright (c) 1999-2001 Jason Gunthorpe +# Copyright (c) 2005 Joey Schulze # # 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 @@ -424,6 +425,11 @@ def GPGKeySearch(SearchCriteria): 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");