Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Fixed compatibility #6
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaHOH committed Jan 9, 2021
1 parent 24fbc39 commit 5a2a127
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ in ipfilter, they will be stored as-is.

There is [a gift](https://github.com/SeaHOH/ban-peers/discussions/1) to the users
of μTorrent 3 classic desktop free version, it wrote in Chinese, you can read via
a translator (e.g. translate.google.com). There is also [a similar article](https://www.sb-innovation.de/showthread.php?34487-Clean-uTorrent)
a translator (e.g. [Google Translate](https://translate.google.com/translate?sl=zh-CN&tl=en&u=https://github.com/SeaHOH/ban-peers/discussions/1)).
There is also [a similar article](https://www.sb-innovation.de/showthread.php?34487-Clean-uTorrent)
(see part **Technical information**) wrote in English.

Resist leech strongly, this is our own rights. If you feels Ban-Peers a good
Expand Down
2 changes: 1 addition & 1 deletion src/ban_peers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
uTorrent.
""")
__app_name__ = 'Ban-Peers'
__version__ = '1.0.4'
__version__ = '1.0.5'
__author__ = 'SeaHOH'
__email__ = '[email protected]'
__license__ = 'MIT'
Expand Down
11 changes: 1 addition & 10 deletions src/ban_peers/i18n/gettext.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def find(domain, localedir=None, languages=None, all=False):


def translation(domain, localedir=None, languages=None,
class_=None, fallback=False, codeset=gettext._unspecified):
class_=None, fallback=False, *args, **kwargs):
if class_ is None:
class_ = gettext.GNUTranslations
mofiles = find(domain, localedir, languages, all=True)
Expand Down Expand Up @@ -116,15 +116,6 @@ def translation(domain, localedir=None, languages=None,
# are not used.
import copy
t = copy.copy(t)
if codeset is not gettext._unspecified:
import warnings
warnings.warn('parameter codeset is deprecated',
DeprecationWarning, 2)
if codeset:
with warnings.catch_warnings():
warnings.filterwarnings('ignore', r'.*\bset_output_charset\b.*',
DeprecationWarning)
t.set_output_charset(codeset)
if result is None:
result = t
else:
Expand Down

0 comments on commit 5a2a127

Please sign in to comment.