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:
@ -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):
|
||||
|
Reference in New Issue
Block a user