Commit ceb31d0
Cloud
fix: add graceful fallback when ColorBrewer palette loading fails offline
Wrap the urllib.request.urlopen() call in _load_colorbrewer() with try/except
to handle network failures gracefully. When offline or the remote gist is
unreachable, PyMOL will now print a warning and continue startup normally
instead of crashing with an unhandled exception.
Changes:
- Add try/except around the HTTP request in _load_colorbrewer()
- Add timeout=5 to prevent long hangs on slow/unreachable networks
- Print a descriptive warning message on failure and return early1 parent 742d0bd commit ceb31d0
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
0 commit comments