From 72852e04dacf77917002bee76be867da11ec549b Mon Sep 17 00:00:00 2001 From: Jesse Mullan Date: Sat, 1 Nov 2014 16:30:38 -0700 Subject: [PATCH] Fix E721 do not compare types, use 'isinstance()' --- headphones/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headphones/api.py b/headphones/api.py index a001dc5d..0097b99f 100644 --- a/headphones/api.py +++ b/headphones/api.py @@ -82,9 +82,9 @@ class Api(object): if self.data == 'OK': logger.info('Recieved API command: %s', self.cmd) methodToCall = getattr(self, "_" + self.cmd) - result = methodToCall(**self.kwargs) + methodToCall(**self.kwargs) if 'callback' not in self.kwargs: - if type(self.data) == type(''): + if isinstance(self.data, basestring): return self.data else: return json.dumps(self.data)