summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2014-09-30 12:45:40 +0000
committerGordon Sim <gsim@apache.org>2014-09-30 12:45:40 +0000
commit5361025d1311900854954b2c66ef15c562b161ff (patch)
treef3ac1fd40bda6480f47dc246b18a3f3eb8839957 /python
parentb09301edaa8b5e441cfd423bb86dec4bc784dced (diff)
downloadqpid-python-5361025d1311900854954b2c66ef15c562b161ff.tar.gz
NO-JIRA: fix syntax for older python versions (and consistent with style used in other modules in this package)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1628423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
-rw-r--r--python/qpid/connection08.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/python/qpid/connection08.py b/python/qpid/connection08.py
index 7694114623..1b794425c9 100644
--- a/python/qpid/connection08.py
+++ b/python/qpid/connection08.py
@@ -61,12 +61,13 @@ class SockIO:
def close(self):
try:
- self.sock.shutdown(SHUT_RDWR)
- except socket.error, e:
- if (e.errno == errno.ENOTCONN):
- pass
- else:
- raise
+ try:
+ self.sock.shutdown(SHUT_RDWR)
+ except socket.error, e:
+ if (e.errno == errno.ENOTCONN):
+ pass
+ else:
+ raise
finally:
self.sock.close()