Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
set loaded flag only at then of loading
Browse files Browse the repository at this point in the history
  • Loading branch information
mzuehlke committed Mar 15, 2018
1 parent 0369697 commit b0cde01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cate/util/im/cmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ def ensure_cmaps_loaded():
if not _CBARS_LOADED:
_LOCK.acquire()
if not _CBARS_LOADED:
_CBARS_LOADED = True
register_lc_color_map()
new_cmaps = []
for cmap_category, cmap_description, cmap_names in _CMAPS:
Expand Down Expand Up @@ -169,6 +168,7 @@ def ensure_cmaps_loaded():
cbar_list.append((cmap_name, cbar_png_bytes))
new_cmaps.append((cmap_category, cmap_description, tuple(cbar_list)))
_CMAPS = tuple(new_cmaps)
_CBARS_LOADED = True
# import pprint
# pprint.pprint(_CMAPS)
_LOCK.release()

0 comments on commit b0cde01

Please sign in to comment.