X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-gpgimport;h=de79b71f56805f027f6ae75125aa3808686009e9;hb=db36cbb61b95f316e9f9bc0d89aea2d3bef3dc54;hp=500f9654ce7a535a5be644c3e1624401b2a703ea;hpb=a86d975ac15e074f142c75ba5c74596be92e740d;p=mirror%2Fuserdir-ldap.git diff --git a/ud-gpgimport b/ud-gpgimport index 500f965..de79b71 100755 --- a/ud-gpgimport +++ b/ud-gpgimport @@ -14,7 +14,7 @@ # in the directory but not in the key ring will be removed from the # directory. -import string, re, time, ldap, getopt, sys, pwd, posix; +import string, re, time, ldap, getopt, sys, pwd, os; from userdir_ldap import *; from userdir_gpg import *; @@ -35,7 +35,7 @@ def LoadOverride(File): UnknownMap[Split[0]] = string.strip(Split[1]); # Process options -AdminUser = pwd.getpwuid(posix.getuid())[0]; +AdminUser = pwd.getpwuid(os.getuid())[0]; (options, arguments) = getopt.getopt(sys.argv[1:], "au:m:n") for (switch, val) in options: if (switch == '-u'): @@ -46,7 +46,7 @@ for (switch, val) in options: NoAct = 0; if len(arguments) == 0: print "Give some keyrings to probe"; - os.exit(0); + sys.exit(0); # Main program starts here