From 9333983d00263b2353573cfa34f5642f72f9a380 Mon Sep 17 00:00:00 2001 From: Jarrett Johnson Date: Sat, 4 Jan 2025 14:49:15 -0500 Subject: [PATCH] again --- modules/pymol/importing.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/pymol/importing.py b/modules/pymol/importing.py index be5db2099..890cced27 100644 --- a/modules/pymol/importing.py +++ b/modules/pymol/importing.py @@ -1208,9 +1208,13 @@ def _fetch(code, name, state, finish, discrete, multiplex, zoom, type, path, url = hostPaths[bioType] url_list = [] + def contains_protocol_or_path_separator(s): + return any(substring in s for substring in ["://", ":\\"]) + for url in url if cmd.is_sequence(url) else [url]: - url_list += [url] if '://' in url else [fetch_host + url - for fetch_host in fetch_host_list] + url_list += [url] if contains_protocol_or_path_separator(url) else [ + fetch_host + url for fetch_host in fetch_host_list + ] if bioType not in ['cc']: code = code.lower()