[Pcsclite-git-commit] [PCSC] 01/02: Python 3: use PEP 3110 exception format

Ludovic Rousseau rousseau at moszumanska.debian.org
Wed Feb 15 23:21:21 UTC 2017


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

rousseau pushed a commit to branch master
in repository PCSC.

commit 5a8bacfed5ea046559efac090824630b219474e2
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date:   Thu Feb 16 00:06:54 2017 +0100

    Python 3: use PEP 3110 exception format
    
    Use the "new" syntax "except Exception as message:" supported since
    Python 2.6
    
      File "SCardCancel2.py", line 47
        except Exception, message:
                        ^
    SyntaxError: invalid syntax
---
 UnitaryTests/SCardCancel2.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UnitaryTests/SCardCancel2.py b/UnitaryTests/SCardCancel2.py
index 9e4715d..074c888 100755
--- a/UnitaryTests/SCardCancel2.py
+++ b/UnitaryTests/SCardCancel2.py
@@ -44,5 +44,5 @@ try:
                             SCardGetErrorMessage(hresult))
         print('Released context.')
 
-except Exception, message:
+except Exception as message:
     print("Exception:", message)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/PCSC.git



More information about the Pcsclite-cvs-commit mailing list