projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebce53b
)
_search_regex's "isatty" call fails with Py2exe's
author
Itay Brandes
<Brandes.Itay@gmail.com>
Sat, 14 Dec 2013 15:40:51 +0000
(17:40 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 16 Dec 2013 20:50:26 +0000
(21:50 +0100)
_search_regex calls the sys.stderr.isatty() function for unix systems.
Py2exe uses a custom Stderr() stream which doesn't have an `isatty()`
function, leading to it's crash.
Fixes easily with checking that it's a unix system first.
youtube_dl/extractor/common.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/common.py
b/youtube_dl/extractor/common.py
index 11b6ed5246e0e9bbee424b91d839fef9570164d0..1fc0624a35a70c830f144d6749bfcc19e5bf47fb 100644
(file)
--- a/
youtube_dl/extractor/common.py
+++ b/
youtube_dl/extractor/common.py
@@
-295,7
+295,7
@@
class InfoExtractor(object):
mobj = re.search(p, string, flags)
if mobj: break
- if
sys.stderr.isatty() and os.name != 'nt'
:
+ if
os.name != 'nt' and sys.stderr.isatty()
:
_name = u'\033[0;34m%s\033[0m' % name
else:
_name = name