diff options
-rw-r--r-- | util/locale_database/localetools.py | 9 | ||||
-rwxr-xr-x | util/locale_database/qlocalexml2cpp.py | 6 |
2 files changed, 5 insertions, 10 deletions
diff --git a/util/locale_database/localetools.py b/util/locale_database/localetools.py index 82691666aa..1f415bbdb3 100644 --- a/util/locale_database/localetools.py +++ b/util/locale_database/localetools.py @@ -41,9 +41,8 @@ import os import tempfile class Error (Exception): - __upinit = Exception.__init__ def __init__(self, msg, *args): - self.__upinit(msg, *args) + super().__init__(msg, *args) self.message = msg def __str__(self): return self.message @@ -126,7 +125,6 @@ class SourceFileEditor (Transcriber): Callers should call close() on success or cleanup() on failure (to clear away the temporary file); see Transcriber. """ - __upinit = Transcriber.__init__ def __init__(self, path, temp): """Set up the source file editor. @@ -134,13 +132,12 @@ class SourceFileEditor (Transcriber): and, on success, replaced with a new version; and the directory in which to store the temporary file during the rewrite.""" - self.__upinit(path, temp) + super().__init__(path, temp) self.__copyPrelude() - __upclose = Transcriber.close def close(self): self.__copyTail() - self.__upclose() + super().close() # Implementation details: GENERATED_BLOCK_START = '// GENERATED PART STARTS HERE' diff --git a/util/locale_database/qlocalexml2cpp.py b/util/locale_database/qlocalexml2cpp.py index e510a49259..6ddb1dbd88 100755 --- a/util/locale_database/qlocalexml2cpp.py +++ b/util/locale_database/qlocalexml2cpp.py @@ -133,9 +133,8 @@ def currencyIsoCodeData(s): return "{0,0,0}" class LocaleSourceEditor (SourceFileEditor): - __upinit = SourceFileEditor.__init__ def __init__(self, path, temp, version): - self.__upinit(path, temp) + super().__init__(path, temp) self.writer.write(""" /* This part of the file was generated on {} from the @@ -447,9 +446,8 @@ class CalendarDataWriter (LocaleSourceEditor): months_data.write(self.writer) class LocaleHeaderWriter (SourceFileEditor): - __upinit = SourceFileEditor.__init__ def __init__(self, path, temp, dupes): - self.__upinit(path, temp) + super().__init__(path, temp) self.__dupes = dupes def languages(self, languages): |