Commit ac36a9d7 authored by Shane Snyder's avatar Shane Snyder
Browse files

avoid keyerror when module isn't present in log

parent 9d8ca7f0
......@@ -321,6 +321,8 @@ def log_get_generic_record(log, mod_name, dtype='numpy'):
"""
modules = log_get_modules(log)
if mod_name not in modules:
return None
mod_type = _structdefs[mod_name]
rec = {}
......@@ -447,6 +449,8 @@ def _log_get_lustre_record(log, dtype='numpy'):
log: handle returned by darshan.open
"""
modules = log_get_modules(log)
if 'LUSTRE' not in modules:
return None
rec = {}
buf = ffi.new("void **")
......@@ -528,6 +532,8 @@ def log_get_dxt_record(log, mod_name, reads=True, writes=True, dtype='dict'):
"""
modules = log_get_modules(log)
if mod_name not in modules:
return None
mod_type = _structdefs[mod_name]
#name_records = log_get_name_records(log)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment