You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2023/04/12 21:24:16 UTC

[qpid-python] branch main updated: QPID-8631: fix setup.py incompatible syntax for Python 3 (#17)

This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-python.git


The following commit(s) were added to refs/heads/main by this push:
     new 566dc21  QPID-8631: fix setup.py incompatible syntax for Python 3 (#17)
566dc21 is described below

commit 566dc213822c1cd2343dbcc836e36b7c3c23be68
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Wed Apr 12 23:24:11 2023 +0200

    QPID-8631: fix setup.py incompatible syntax for Python 3 (#17)
---
 setup.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/setup.py b/setup.py
index 87b3000..92f4c96 100755
--- a/setup.py
+++ b/setup.py
@@ -61,18 +61,21 @@ class preprocessor:
       else:
         try:
           fsrc = open(src, 'rb')
-        except os.error as (errno, errstr):
+        except os.error as e:
+          errno, errstr = e.args
           raise DistutilsFileError("could not open '%s': %s" % (src, errstr))
 
         if os.path.exists(dst):
           try:
             os.unlink(dst)
-          except os.error as (errno, errstr):
+          except os.error as e:
+            errno, errstr = e.args
             raise DistutilsFileError("could not delete '%s': %s" % (dst, errstr))
 
         try:
           fdst = open(dst, 'wb')
-        except os.error as (errno, errstr):
+        except os.error as e:
+          errno, errstr = e.args
           raise DistutilsFileError("could not create '%s': %s" % (dst, errstr))
 
         try:


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org