aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 2e48f187e..4c8bdbb0c 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1098,3 +1098,7 @@ def url_basename(url):
class HEADRequest(compat_urllib_request.Request):
def get_method(self):
return "HEAD"
+
+
+def int_or_none(v):
+ return v if v is None else int(v)