From 80857e61ed3a9ea304174426518ad707692fde82 Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sat, 11 Jun 2005 20:09:06 +0000 Subject: Miroslav Trmac writes: The 'port' setting used to be an integer, now it can be an integer or a string, depending on the presence of IPv6 support. fetchmailconf assumes 'port' is an integer, though. When 'port' is a string, it defaults to None; fetchmailconf can't handle that and writes 'port None' to the output config file if the server entry is not edited, see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=55623 The attached patch fixes this. Note that fetchmailconf still doesn't support other string values for 'port', even with this patch. Mirek svn path=/trunk/; revision=4058 --- NEWS | 3 +++ fetchmailconf | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 2ae334d3..d60cbfe2 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,9 @@ manual page. UIDL isn't flaky as the man page suggested, but a reliability feature. In fact, IMAP4 code is flaky in that it relies on the upstream seen flags. (Matthias Andree) +* Miloslav Trmac's patch for fetchmailconf to support string-type values + of the "port" variable, avoiding "port None" corruption in .fetchmailrc. + To fix Redhat Bug #55623 (Matthias Andree) fetchmail-6.2.5 (Wed Oct 15 18:39:22 EDT 2003), 23079 lines: diff --git a/fetchmailconf b/fetchmailconf index ef41a5df..b28a5d96 100755 --- a/fetchmailconf +++ b/fetchmailconf @@ -133,7 +133,7 @@ class Server: res = res + (" via " + str(self.via) + "\n"); if self.protocol != ServerDefaults.protocol: res = res + " with proto " + self.protocol - if self.port != defaultports[self.protocol] and self.port != 0: + if self.port != defaultports[self.protocol] and self.port: res = res + " port " + `self.port` if self.timeout != ServerDefaults.timeout: res = res + " timeout " + `self.timeout` -- cgit v1.2.3