From 2d8a5885db39b866a175af0603de26d73ccb2085 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 12 Oct 1998 15:50:18 +0000 Subject: Enable fetchmailconf to deal with zsh. svn path=/trunk/; revision=2083 --- fetchmailconf | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fetchmailconf') diff --git a/fetchmailconf b/fetchmailconf index 51f64829..6b7f0cd4 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -167,6 +167,13 @@ class Server: class User: def __init__(self): + if os.environ.has_key("USER"): + self.remote = os.environ["USER"] # Remote username + elif os.environ.has_key("LOGNAME"): + self.remote = os.environ["LOGNAME"] + else: + print "Can't get your username!" + sys.exit(1) self.remote = os.environ["USER"]# Remote username self.localnames = [self.remote,]# Local names self.password = None # Password for mail account access -- cgit v1.2.3