[Pkg-mpd-commits] [python-mpd] 92/262: mpd.py fix shadowed variable in _connect_tcp()

Simon McVittie smcv at debian.org
Sun May 22 18:16:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch upstream
in repository python-mpd.

commit 0283e40a1594ac7f4ef969d48a85a80db55526ff
Author: Jörg Thalheim <jthalheim at gmail.com>
Date:   Tue Feb 14 23:35:08 2012 +0100

    mpd.py fix shadowed variable in _connect_tcp()
    
    In python3 named except blocks, will not longer overwrite local
    variable. Instead the variable is not accessable after the try-except
    statement -> NameError.
---
 mpd.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mpd.py b/mpd.py
index e25e5b2..f7c3d50 100644
--- a/mpd.py
+++ b/mpd.py
@@ -389,7 +389,8 @@ class MPDClient():
                 sock = socket.socket(af, socktype, proto)
                 sock.connect(sa)
                 return sock
-            except socket.error as err:
+            except socket.error as e:
+                err = e
                 if sock is not None:
                     sock.close()
         if err is not None:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mpd/python-mpd.git



More information about the Pkg-mpd-commits mailing list