projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0969bdd
)
Clean up with the help of pep8
author
Philipp Hagemeister
<phihag@phihag.de>
Tue, 27 Nov 2012 17:55:35 +0000
(18:55 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Tue, 27 Nov 2012 17:55:35 +0000
(18:55 +0100)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 45582ca11cd182ff019a3ca8c49e2ff369692cee..68a6fae1b1d3c25aabafeb0b198a3ee86761dd33 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-126,8
+126,10
@@
class IDParser(HTMLParser.HTMLParser):
handle_decl = handle_pi = unknown_decl = find_startpos
def get_result(self):
- if self.result == None: return None
- if len(self.result) != 3: return None
+ if self.result is None:
+ return None
+ if len(self.result) != 3:
+ return None
lines = self.html.split('\n')
lines = lines[self.result[1][0]-1:self.result[2][0]]
lines[0] = lines[0][self.result[1][1]:]