aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/util.py')
-rw-r--r--youtube/util.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/youtube/util.py b/youtube/util.py
index a70bd7e..ec25d40 100644
--- a/youtube/util.py
+++ b/youtube/util.py
@@ -357,6 +357,15 @@ def left_remove(string, substring):
return string[len(substring):]
return string
+def concat_or_none(*strings):
+ '''Concatenates strings. Returns None if any of the arguments are None'''
+ result = ''
+ for string in strings:
+ if string is None:
+ return None
+ result += string
+ return result
+
def prefix_urls(item):
try: