Skip to content

Commit 217581f

Browse files
authoredAug 26, 2022
Merge pull request #11 from fot/fix_states_switchstates
Fix states switchstates
2 parents ae47bd9 + 0a9042b commit 217581f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎glimmon_archive_cron.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def check_and_copy_file(new_revision, arch_revision):
105105
new_revision[0], new_revision[1]))
106106
print(f"{datestring}: New G_LIMMON.dec file copied")
107107

108-
tdbs = pickle.load(open(tdbfile, 'r'))
108+
tdbs = pickle.load(open(tdbfile, 'rb'))
109109
glimmondb.merge_new_glimmon_to_db(newfile, tdbs)
110110
print(f"{datestring}:New G_LIMMON.dec merged into sqlite database")
111111

‎glimmondb/glimmondb.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ def fill_states(tdb, g, msid):
324324

325325
if 'es_switch' in list(tdb[msid].keys()):
326326
for setkey in states['setkeys']: # assuming there are limit switch states for each set
327-
charkey = str(setkey + 1)
327+
intkey = setkey + 1
328328
try:
329-
states[setkey]['switchstate'] = tdb[msid]['es_switch'][charkey]['state_code']
329+
states[setkey]['switchstate'] = tdb[msid]['es_switch'][intkey]['state_code']
330330
except:
331331
states[setkey]['switchstate'] = 'none'
332332

‎glimmondb/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__all__ = ['__version__']
22

3-
__version__ = '0.6.0'
3+
__version__ = '0.7.0'

0 commit comments

Comments
 (0)
Please sign in to comment.