diff --git a/util/locale_database/cldr2qtimezone.py b/util/locale_database/cldr2qtimezone.py index c5eb61c2a8..1e783b6add 100755 --- a/util/locale_database/cldr2qtimezone.py +++ b/util/locale_database/cldr2qtimezone.py @@ -363,7 +363,7 @@ def main(args, out, err): dict((name, ind) for ind, name in enumerate((x[0] for x in windowsIdList), 1))) except IOError as e: usage(err, name, - 'Failed to open common/supplemental/windowsZones.xml: ' + (e.message or e.args[1])) + 'Failed to open common/supplemental/windowsZones.xml: ' + str(e)) return 1 except Error as e: err.write('\n'.join(textwrap.wrap( @@ -375,7 +375,7 @@ def main(args, out, err): try: writer = ZoneIdWriter(dataFilePath, qtPath) except IOError as e: - err.write('Failed to open files to transcribe: {}'.format(e.message or e.args[1])) + err.write('Failed to open files to transcribe: {}'.format(e)) return 1 try: diff --git a/util/locale_database/qlocalexml2cpp.py b/util/locale_database/qlocalexml2cpp.py index 60d0e69228..8194b15755 100755 --- a/util/locale_database/qlocalexml2cpp.py +++ b/util/locale_database/qlocalexml2cpp.py @@ -552,7 +552,7 @@ def main(args, out, err): 'qlocale_data_p.h'), qtsrcdir, reader.cldrVersion) except IOError as e: - err.write('Failed to open files to transcribe locale data: ' + (e.message or e.args[1])) + err.write('Failed to open files to transcribe locale data: ' + str(e)) return 1 try: @@ -582,7 +582,7 @@ def main(args, out, err): qtsrcdir, reader.cldrVersion) except IOError as e: err.write('Failed to open files to transcribe ' + calendar - + ' data ' + (e.message or e.args[1])) + + ' data ' + str(e)) return 1 try: @@ -599,7 +599,7 @@ def main(args, out, err): writer = LocaleHeaderWriter(os.path.join(qtsrcdir, 'src', 'corelib', 'text', 'qlocale.h'), qtsrcdir, reader.dupes) except IOError as e: - err.write('Failed to open files to transcribe qlocale.h: ' + (e.message or e.args[1])) + err.write('Failed to open files to transcribe qlocale.h: ' + str(e)) return 1 try: @@ -618,7 +618,7 @@ def main(args, out, err): writer = Transcriber(os.path.join(qtsrcdir, 'src', 'corelib', 'text', 'qlocale.qdoc'), qtsrcdir) except IOError as e: - err.write('Failed to open files to transcribe qlocale.qdoc: ' + (e.message or e.args[1])) + err.write('Failed to open files to transcribe qlocale.qdoc: ' + str(e)) return 1 DOCSTRING = " QLocale's data is based on Common Locale Data Repository "