diff options
author | DjLegolas <djlegolas@protonmail.com> | 2021-12-28 22:20:57 +0200 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2021-12-29 21:51:07 +0000 |
commit | ec0bcc11f510cd113bbdb6cd551b27c697f03f53 (patch) | |
tree | c60c19a61a14fa157227ad7531406f250493b78e /deluge/i18n | |
parent | 16895b4a492aedca8bcc2929a905207341c36b35 (diff) | |
download | deluge-ec0bcc11f510cd113bbdb6cd551b27c697f03f53.tar.gz deluge-ec0bcc11f510cd113bbdb6cd551b27c697f03f53.tar.bz2 deluge-ec0bcc11f510cd113bbdb6cd551b27c697f03f53.zip |
Upgrade codebase with pyupgrade (>=py3.6)
Added pyupgrade utility with manual stage to pre-commit and run on all
files.
Ref: https://github.com/asottile/pyupgrade
Closes: deluge-torrent/deluge#326
Diffstat (limited to 'deluge/i18n')
-rw-r--r-- | deluge/i18n/languages.py | 1 | ||||
-rw-r--r-- | deluge/i18n/util.py | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/deluge/i18n/languages.py b/deluge/i18n/languages.py index 5f7defc80..5673c7116 100644 --- a/deluge/i18n/languages.py +++ b/deluge/i18n/languages.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # This file is public domain. # diff --git a/deluge/i18n/util.py b/deluge/i18n/util.py index 897f412f2..3741c365c 100644 --- a/deluge/i18n/util.py +++ b/deluge/i18n/util.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # # Copyright (C) 2007,2008 Andrew Resch <andrewresch@gmail.com> # @@ -77,7 +76,7 @@ def set_language(lang): translation = gettext.translation( 'deluge', localedir=get_translations_path(), languages=[lang] ) - except IOError: + except OSError: log.warning('Unable to find translation (.mo) to set language: %s', lang) else: translation.install() |