mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 03:54:50 +00:00
Use basestring instead of str and unicode
This commit is contained in:
parent
37a00a48a7
commit
504751424f
2 changed files with 2 additions and 2 deletions
|
@ -454,7 +454,7 @@ class Core(component.Component):
|
|||
"""Set the config with values from dictionary"""
|
||||
# Load all the values into the configuration
|
||||
for key in config.keys():
|
||||
if isinstance(config[key], unicode) or isinstance(config[key], str):
|
||||
if isinstance(config[key], basestring):
|
||||
config[key] = config[key].encode("utf8")
|
||||
self.config[key] = config[key]
|
||||
|
||||
|
|
|
@ -854,7 +854,7 @@ class WebApi(JSONComponent):
|
|||
"""
|
||||
web_config = component.get("DelugeWeb").config
|
||||
for key in config.keys():
|
||||
if isinstance(config[key], unicode) or isinstance(config[key], str):
|
||||
if isinstance(config[key], basestring):
|
||||
config[key] = config[key].encode("utf8")
|
||||
web_config[key] = config[key]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue