summaryrefslogtreecommitdiff
path: root/apt/progress
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-01-10 18:08:13 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-01-10 18:08:13 +0100
commit660c5bbf9d2793a392572e1c23eb36b4e9298792 (patch)
treea74476633321630911690e7f513869efe5026132 /apt/progress
parentb221e38a33871bc7040e457051c38ef222e618e5 (diff)
downloadpython-apt-660c5bbf9d2793a392572e1c23eb36b4e9298792.tar.gz
merged lp:~geser/ubuntu/natty/python-apt/build-with-py3.2 (manually as bzr thinks the branches have nothing in common)
Diffstat (limited to 'apt/progress')
-rw-r--r--apt/progress/base.py6
-rw-r--r--apt/progress/gtk2.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/apt/progress/base.py b/apt/progress/base.py
index 6822b74a..97375431 100644
--- a/apt/progress/base.py
+++ b/apt/progress/base.py
@@ -211,7 +211,7 @@ class InstallProgress(object):
"""Update the interface."""
try:
line = self.status_stream.readline()
- except IOError, err:
+ except IOError as err:
# resource temporarly unavailable is ignored
if err.errno != errno.EAGAIN and err.errno != errno.EWOULDBLOCK:
print err.strerror
@@ -266,7 +266,7 @@ class InstallProgress(object):
try:
select.select([self.status_stream], [], [],
self.select_timeout)
- except select.error, (errno_, _errstr):
+ except select.error as (errno_, _errstr):
if errno_ != errno.EINTR:
raise
@@ -275,7 +275,7 @@ class InstallProgress(object):
(pid, res) = os.waitpid(self.child_pid, os.WNOHANG)
if pid == self.child_pid:
break
- except OSError, err:
+ except OSError as err:
if err.errno == errno.ECHILD:
break
if err.errno != errno.EINTR:
diff --git a/apt/progress/gtk2.py b/apt/progress/gtk2.py
index acb01eed..9137ef76 100644
--- a/apt/progress/gtk2.py
+++ b/apt/progress/gtk2.py
@@ -506,7 +506,7 @@ def _test():
apt_progress.show_terminal(True)
try:
cache.commit(apt_progress.acquire, apt_progress.install)
- except Exception, exc:
+ except Exception as exc:
print >> sys.stderr, "Exception happened:", exc
if len(sys.argv) > 1:
deb = DebPackage(sys.argv[1], cache)