Skip to content

Commit

Permalink
update logger debug statement and remove conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
sanahabhimani committed Dec 27, 2023
1 parent ba6eafb commit 8581e88
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions python/hk/getdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -854,25 +854,16 @@ def load_range(start, stop, fields=None, alias=None,
base = os.path.join(data_dir, str(folder))
if not os.path.exists(base):
# see if book exists instead
#hk_logger.debug(f'{base} does not exist')
if daq_node is None:
if node in data_dir:
book_path = 'hk_'+str(folder)+'_'+node
base = data_dir+'/'+str(book_path)
else:
hk_logger.debug(f'No daq node info provided in {data_dir}, and'
'daq_node arg is None; going to assume data_dir'
'points to .g3 files')
# assumes .g3 files but should be more explicit
hk_logger.debug(f'No daq node info provided in {data_dir}, cannot'
'find HK book. Assuming path is to .g3 files.')
# assumes path is to .g3 files instead of HK book
base = data_dir+'/'+str(folder)
else:
book_path = 'hk_'+str(folder)+'_'+daq_node
base = data_dir+'/'+str(book_path)

#if not os.path.exists(base):
# hk_logger.debug('{} does not exist, skipping'.format(base))
# continue

for file in sorted(os.listdir(base)):
if i in file.split('.') == '.yaml':
continue
Expand Down

0 comments on commit 8581e88

Please sign in to comment.