From 45feb672af7cab42898fc0f249c6fbe5a4a36e12 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 22 Apr 2013 16:38:55 +0200 Subject: Improve Python 3.x compatibility Some mechanical translation of the deprecated except x,y construct. Should work with Python >= 2.6 just fine Change-Id: I394f9956b9e3e3d9f5f1e9ad50c35b13200af2a1 --- glanceclient/v1/images.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glanceclient/v1/images.py') diff --git a/glanceclient/v1/images.py b/glanceclient/v1/images.py index 99a2bd7..60e7bf0 100644 --- a/glanceclient/v1/images.py +++ b/glanceclient/v1/images.py @@ -207,7 +207,7 @@ class ImageManager(base.Manager): obj_size = obj.tell() obj.seek(0) return obj_size - except IOError, e: + except IOError as e: if e.errno == errno.ESPIPE: # Illegal seek. This means the user is trying # to pipe image data to the client, e.g. -- cgit v1.2.1