projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
134cff4
)
Use alternative imports for Python 2.4 (Closes #138)
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 6 Aug 2011 09:47:53 +0000
(11:47 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 6 Aug 2011 09:48:45 +0000
(11:48 +0200)
youtube-dl
patch
|
blob
|
history
diff --git
a/youtube-dl
b/youtube-dl
index 3b06908c98c55af50b167f1d94895fbda8fc1de7..9f391db0d6f3cb3bc2fa2c2e2a6de0dbc63e7e07 100755
(executable)
--- a/
youtube-dl
+++ b/
youtube-dl
@@
-12,9
+12,7
@@
from __future__ import with_statement
import contextlib
import cookielib
-import ctypes
import datetime
-import email.utils
import gzip
import htmlentitydefs
import httplib
@@
-34,6
+32,13
@@
import urllib2
import warnings
import zlib
+if os.name == 'nt':
+ import ctypes
+
+try:
+ import email.utils
+except ImportError: # Python 2.4
+ import email.Utils
try:
import cStringIO as StringIO
except ImportError: