diff --git a/botlib/__init__.py b/botlib/__init__.py old mode 100755 new mode 100644 diff --git a/botlib/cli.py b/botlib/cli.py old mode 100755 new mode 100644 diff --git a/botlib/cron.py b/botlib/cron.py old mode 100755 new mode 100644 diff --git a/botlib/curl.py b/botlib/curl.py old mode 100755 new mode 100644 index 0561267..9ce4967 --- a/botlib/curl.py +++ b/botlib/curl.py @@ -184,7 +184,9 @@ class Curl: if not parts: raise URLError('URL not valid: "{}"'.format(url_str)) - ext = parts.path.split('.')[-1] or 'unknown' + ext = parts.path.split('.')[-1] + if not ext or len(ext) > 4: + ext = 'unknown' file_path = os.path.join(dest_dir, fname + '.' + ext) if override or not os.path.isfile(file_path): url = parts.geturl() diff --git a/botlib/helper.py b/botlib/helper.py old mode 100755 new mode 100644 diff --git a/botlib/oncedb.py b/botlib/oncedb.py old mode 100755 new mode 100644 diff --git a/botlib/tgclient.py b/botlib/tgclient.py old mode 100755 new mode 100644