X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Futils.py;h=5301d07404b4d83c4df5c99dd9a69f577b87f091;hb=46bc9b7d7cea2e161670e65abe42ef01d39e8957;hp=ac60ba18cd9fd9c5ecba155af3752458d0729766;hpb=b78531a36abd765aa9c9df1dba1cf82dc23f8fec;p=youtube-dl diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index ac60ba18c..5301d0740 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1549,15 +1549,11 @@ def setproctitle(title): def remove_start(s, start): - if s.startswith(start): - return s[len(start):] - return s + return s[len(start):] if s is not None and s.startswith(start) else s def remove_end(s, end): - if s.endswith(end): - return s[:-len(end)] - return s + return s[:-len(end)] if s is not None and s.endswith(end) else s def remove_quotes(s):