From a7075ed7455619934e9d32ab2b0b466eed7c7e60 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 7 Jul 2001 18:13:39 +0000 Subject: Close debian bug that clobbered .fetchmailorc. svn path=/trunk/; revision=3407 --- fetchmailconf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'fetchmailconf') diff --git a/fetchmailconf b/fetchmailconf index b993c7c6..fc4613c2 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -4,7 +4,7 @@ # by Eric S. Raymond, . # Requires Python with Tkinter, and the following OS-dependent services: # posix, posixpath, socket -version = "1.37" +version = "1.38" from Tkinter import * from Dialog import * @@ -364,7 +364,8 @@ class User: for x in trimmed: res = res + " " + x res = res + "\n" - trimmed = self.fetchdomains; + trimmed = self.fetchdomains + print "FOO!", `trimmed` if trimmed != [] and trimmed[len(trimmed) - 1] == hostname: trimmed = trimmed[0:len(trimmed) - 1] if trimmed != []: @@ -833,6 +834,10 @@ class ConfigurationEdit(Frame, MyWidget): bitmap = 'question', strings = ('Yes', 'No'), default = 1).num == 0: + try: + os.rename(self.outfile, self.outfile + "~") + except OSError: + pass fm = open(self.outfile, 'w') if fm: fm.write("# Configuration created %s by fetchmailconf\n" % time.ctime(time.time())) -- cgit v1.2.3