diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2014-08-10 11:00:14 +0200 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2014-08-10 11:00:14 +0200 |
commit | 40a90862f49f89bdfcd6feea5340538efc2b6a5c (patch) | |
tree | c425dfbbb97d72eebb1495c4d2c7a7e54cf9396c /youtube_dl/utils.py | |
parent | 511c4325dc8e3a60d81d3c23e8eb330b3a706883 (diff) |
[reverbnation] The 'uploader_id' field must be a string
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r-- | youtube_dl/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index e40b367c2..9b94407f4 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1275,6 +1275,9 @@ def int_or_none(v, scale=1, default=None, get_attr=None, invscale=1): v = getattr(v, get_attr, None) return default if v is None else (int(v) * invscale // scale) +def str_or_none(v, default=None): + return default if v is None else compat_str(v) + def str_to_int(int_str): if int_str is None: |