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
|
b
|
def set_item(self, key, value):
|
180 | 180 | |
181 | 181 | # Do not allow the type to change unless it is None |
182 | 182 | oldtype, newtype = type(self.__config[key]), type(value) |
183 | | |
184 | | if value is not None and not isinstance(oldtype, type(None)) and not isinstance(oldtype, newtype): |
| 183 | if value is not None and not oldtype == type(None) and not oldtype ==newtype: |
185 | 184 | try: |
186 | 185 | if oldtype == unicode: |
187 | 186 | value = oldtype(value, "utf8") |