We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 742d0bd + ceb31d0 commit 7a6620dCopy full SHA for 7a6620d
configs/.pymolrc.py
@@ -79,7 +79,11 @@ def should_check() -> bool:
79
def _load_colorbrewer():
80
"""Load ColorBrewer palettes into PyMOL."""
81
url = "https://gist.githubusercontent.com/frankrowe/9007567/raw/colorbrewer.js"
82
- js_text = urllib.request.urlopen(url).read().decode("utf-8")
+ try:
83
+ js_text = urllib.request.urlopen(url, timeout=5).read().decode("utf-8")
84
+ except Exception as exc:
85
+ print(f"Warning: unable to load ColorBrewer palettes ({exc}). Skipping.")
86
+ return
87
88
# Extract the JavaScript object containing the ColorBrewer palettes
89
obj_text = re.search(r"var\s+colorbrewer\s*=\s*(\{.*\});", js_text, flags=re.DOTALL).group(1)
0 commit comments