From 772260073b8245468f7d73c0b62fee041b6be920 Mon Sep 17 00:00:00 2001
From: Alex Knaust <awknaust@gmail.com>
Date: Sat, 27 Sep 2014 14:49:48 -0600
Subject: [PATCH] Fix a bug in config typechecking

---
 deluge/config.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/deluge/config.py b/deluge/config.py
index a59f922..def4b46 100644
--- a/deluge/config.py
+++ b/deluge/config.py
@@ -180,8 +180,7 @@ def set_item(self, key, value):
 
         # Do not allow the type to change unless it is None
         oldtype, newtype = type(self.__config[key]), type(value)
-
-        if value is not None and not isinstance(oldtype, type(None)) and not isinstance(oldtype, newtype):
+        if value is not None and not oldtype == type(None) and not oldtype ==newtype:
             try:
                 if oldtype == unicode:
                     value = oldtype(value, "utf8")
-- 
1.9.1

