]> Pileus Git - ~andy/fetchmail/commitdiff
Minor fixes from Guenther Leber.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 17 Nov 1998 16:48:03 +0000 (16:48 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 17 Nov 1998 16:48:03 +0000 (16:48 -0000)
svn path=/trunk/; revision=2185

fetchmailconf

index 8f7541bbcd6a24e300555e75dd0e824c74df2122..aef75a72aa227bfb51611ecdabf75a76f44edaf8 100755 (executable)
@@ -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])
 
 #