1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-07-15 01:24:29 +02:00

cover empty data case in process

This commit is contained in:
Kelly Brazil
2020-07-31 14:45:30 -07:00
parent 37d3bc699c
commit e1f3feb8f5

View File

@ -75,6 +75,7 @@ def process(proc_data):
"timezone": string
}
"""
if proc_data:
return {
"year": int(proc_data['year']),
"month": proc_data['month'],
@ -85,6 +86,8 @@ def process(proc_data):
"second": int(proc_data['second']),
"timezone": proc_data['timezone']
}
else:
return {}
def parse(data, raw=False, quiet=False):