Add try
This commit is contained in:
parent
43b0585723
commit
77894ea1fe
1 changed files with 4 additions and 1 deletions
|
@ -101,7 +101,10 @@ class image_classifier:
|
||||||
self.exif_info.set("user_comment", json.dumps(data))
|
self.exif_info.set("user_comment", json.dumps(data))
|
||||||
|
|
||||||
def is_json(self, data):
|
def is_json(self, data):
|
||||||
result = json.loads(data)
|
try:
|
||||||
|
result = json.loads(data)
|
||||||
|
except TypeError:
|
||||||
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def load_known_people(self):
|
def load_known_people(self):
|
||||||
|
|
Loading…
Reference in a new issue