changeset 5384:31bfa492311e

GenerateErrorCodes.py now works with python3
author Alain Mazy <am@osimis.io>
date Wed, 06 Sep 2023 16:09:16 +0200
parents 33410f14033b
children 3d3e38fb2af8
files OrthancFramework/Resources/CodeGeneration/GenerateErrorCodes.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Resources/CodeGeneration/GenerateErrorCodes.py	Wed Sep 06 15:57:11 2023 +0200
+++ b/OrthancFramework/Resources/CodeGeneration/GenerateErrorCodes.py	Wed Sep 06 16:09:16 2023 +0200
@@ -122,7 +122,7 @@
 with open(path, 'r') as f:
     a = f.read()
 
-e = filter(lambda x: 'SQLite' in x and x['SQLite'], ERRORS)
+e = list(filter(lambda x: 'SQLite' in x and x['SQLite'], ERRORS))
 s = ',\n'.join(map(lambda x: '      ErrorCode_%s' % x['Name'], e))
 a = re.sub('(enum ErrorCode\s*{)[^}]*?(\s*};)', r'\1\n%s\2' % s, a, re.DOTALL)