Module: deluge
Branch: master
Commit: 504751424faec0255c0cfbf9f398a760fe63b0f6

Author: John Garland <[email protected]>
Date:   Fri Jul  2 15:19:42 2010 +1000

Use basestring instead of str and unicode

---

 deluge/core/core.py       |    2 +-
 deluge/ui/web/json_api.py |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/deluge/core/core.py b/deluge/core/core.py
index 636d6b7..c9fcfd1 100644
--- a/deluge/core/core.py
+++ b/deluge/core/core.py
@@ -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]
 
diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py
index f917c88..28bb757 100644
--- a/deluge/ui/web/json_api.py
+++ b/deluge/ui/web/json_api.py
@@ -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]
 

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to