From patchwork Mon May 25 16:05:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3133 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49W24w6Xcdz3xQr for ; Mon, 25 May 2020 16:05:52 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49W24w36cyz2Pn; Mon, 25 May 2020 16:05:51 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49W24v3yg3z2y9K; Mon, 25 May 2020 16:05:51 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49W24s24Vhz2y3H; Mon, 25 May 2020 16:05:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49W24q5dc9z1DG; Mon, 25 May 2020 16:05:47 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1590422748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tOcRiZ3MpmjDjDwr1TW4KWtowdpreiOBef2q0QpUFSc=; b=8n22TobAp/jhcHRnBvW5dExbRDDovw9zMec4bNtSRdMvXhFXO/LgTpkCabJg8hYhi/6itW KryFPBThMhPQj8CQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1590422748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=tOcRiZ3MpmjDjDwr1TW4KWtowdpreiOBef2q0QpUFSc=; b=HdbCWmfHLG1SHX1o+Qaptb+gdC8mZyZoQ02Qkrg1ePTQZgza12vQE7gmgR75uhlKSamk/5 GJyWjrBS8wdUrU9Fbtm5RTiVOMKkz+b9/3sQLm+MGyJDI3aPFWbZMRX1r7eCvNib9Y+WEF fJQZBiFJE1K3P2wdXbMr1X/LKyCQEHGIOmjw0uUU8RP9HXJD2HhBbXx6OEQib02Cp8zYug NBbZxBHJLUo2RTysS0BD5NJn9JvnyZ9Ngyc27eeig/WNomKyjwqXfxyNSTtGpixo44o2Tr WJcLTRJycf0JyNS1NmWDPfFeHqB/i00ts1gLMV4m7KlXqzH8tUUQgaHzAavVRg== From: Stefan Schantl To: ddns@lists.ipfire.org Subject: [PATCH] ProviderDDNSS: Fix unhandled exception on update Date: Mon, 25 May 2020 18:05:45 +0200 Message-Id: <20200525160545.3816-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Authentication-Results: mail01.ipfire.org; auth=pass smtp.mailfrom=stefan.schantl@ipfire.org X-BeenThere: ddns@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List for the IPFire dynamic DNS client List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: development@lists.ipfire.org Errors-To: ddns-bounces@lists.ipfire.org Sender: "ddns" In python > 3.3 the getheader() attribute is not longer part of the urllib.response response.info() object. It is part of response object and so directly can be accessed. Fixes #12328 Signed-off-by: Stefan Schantl Reviewed-by: Michael Tremer --- src/ddns/providers.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ddns/providers.py b/src/ddns/providers.py index f1fed22..46d8a67 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -642,10 +642,8 @@ class DDNSProviderDDNSS(DDNSProvider): response = self.send_request(self.url, data=data) # This provider sends the response code as part of the header. - header = response.info() - # Get status information from the header. - output = header.getheader('ddnss-response') + output = response.getheader('ddnss-response') # Handle success messages. if output == "good" or output == "nochg":