From 0f1eb31ca43a592fb71b6f9db612e83f5e3a2598 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 17 Nov 1998 16:48:03 +0000 Subject: Minor fixes from Guenther Leber. svn path=/trunk/; revision=2185 --- fetchmailconf | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fetchmailconf') diff --git a/fetchmailconf b/fetchmailconf index 8f7541bb..aef75a72 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -690,7 +690,8 @@ class ConfigurationEdit(Frame, MyWidget): if fm: fm.write("# Configuration created %s by fetchmailconf\n" % time.ctime(time.time())) fm.write(`self.configuration`) - os.chmod(self.outfile, 0600) + if fm != sys.stdout: + os.chmod(self.outfile, 0600) self.quit() # @@ -1368,7 +1369,7 @@ def copy_instance(toclass, fromdict): # The `optional' fields are the ones we can ignore for purposes of # conformability checking; they'll still get copied if they are # present in the dictionary. - optional = ('interface', 'monitor', 'netsec'); + optional = ('interface', 'monitor', 'netsec') class_sig = setdiff(toclass.__dict__.keys(), optional) class_sig.sort() dict_keys = setdiff(fromdict.keys(), optional) @@ -1388,7 +1389,7 @@ def copy_instance(toclass, fromdict): print "Not matched in dictionary keys: " + `diff` sys.exit(1) else: - for x in dict_keys: + for x in fromdict.keys(): setattr(toclass, x, fromdict[x]) # -- cgit v1.2.3