summaryrefslogtreecommitdiffstats
path: root/module/lib/feedparser.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-30 16:20:37 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-01-30 16:20:37 +0100
commitf96a5a1cf8800edc2f6a6d73316f7d7c67f32e29 (patch)
tree3081be7874ac1594e1ab4b9c58f2de503acac0b5 /module/lib/feedparser.py
parentfixed ssl xmlrpc backend (diff)
downloadpyload-f96a5a1cf8800edc2f6a6d73316f7d7c67f32e29.tar.xz
cleanup code
Diffstat (limited to 'module/lib/feedparser.py')
-rw-r--r--module/lib/feedparser.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/lib/feedparser.py b/module/lib/feedparser.py
index 1fd5cfc3e..a746ed8f5 100644
--- a/module/lib/feedparser.py
+++ b/module/lib/feedparser.py
@@ -1685,7 +1685,7 @@ class _FeedParserMixin:
def _end_media_thumbnail(self):
url = self.pop('url')
context = self._getContext()
- if url != None and len(url.strip()) != 0:
+ if url is not None and len(url.strip()) != 0:
if not context['media_thumbnail'][-1].has_key('url'):
context['media_thumbnail'][-1]['url'] = url
@@ -1736,7 +1736,7 @@ if _XML_AVAILABLE:
else:
givenprefix = None
prefix = self._matchnamespaces.get(lowernamespace, givenprefix)
- if givenprefix and (prefix == None or (prefix == '' and lowernamespace == '')) and not self.namespacesInUse.has_key(givenprefix):
+ if givenprefix and (prefix is None or (prefix == '' and lowernamespace == '')) and not self.namespacesInUse.has_key(givenprefix):
raise UndeclaredNamespace, "'%s' is not associated with a namespace" % givenprefix
localname = str(localname).lower()
@@ -2806,7 +2806,7 @@ class _FeedURLHandler(urllib2.HTTPDigestAuthHandler, urllib2.HTTPRedirectHandler
host = urlparse.urlparse(req.get_full_url())[1]
try:
assert sys.version.split()[0] >= '2.3.3'
- assert base64 != None
+ assert base64 is not None
user, passw = _base64decode(req.headers['Authorization'].split(' ')[1]).split(':')
realm = re.findall('realm="([^"]*)"', headers['WWW-Authenticate'])[0]
self.add_password(realm, host, user, passw)