mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Merge pull request #1663 from tim-moody/map-dirs
handle first time when idx file does not exist
This commit is contained in:
commit
81cb74f1c4
1 changed files with 6 additions and 3 deletions
|
@ -114,9 +114,12 @@ def get_installed_regions():
|
|||
|
||||
def read_vector_map_idx():
|
||||
global previous_idx
|
||||
with open(vector_map_idx_dir + '/vector-map-idx.json','r') as idx:
|
||||
str = idx.read()
|
||||
previous_idx = json.loads(str)
|
||||
try: # will fail first time
|
||||
with open(vector_map_idx_dir + '/vector-map-idx.json','r') as idx:
|
||||
str = idx.read()
|
||||
previous_idx = json.loads(str)
|
||||
except:
|
||||
pass
|
||||
|
||||
def write_vector_map_idx(installed_maps):
|
||||
map_dict ={}
|
||||
|
|
Loading…
Reference in a new issue