mirror of https://gitlab.com/bashrc2/epicyon
Exception handling for actor
parent
47aa3fbc1e
commit
e868020392
|
@ -295,8 +295,12 @@ def personLookup(domain: str,path: str,baseDir: str) -> {}:
|
||||||
if not os.path.isfile(filename):
|
if not os.path.isfile(filename):
|
||||||
return None
|
return None
|
||||||
personJson={"user": "unknown"}
|
personJson={"user": "unknown"}
|
||||||
|
try:
|
||||||
with open(filename, 'r') as fp:
|
with open(filename, 'r') as fp:
|
||||||
personJson=commentjson.load(fp)
|
personJson=commentjson.load(fp)
|
||||||
|
except:
|
||||||
|
print('WARN: Failed to load actor '+filename)
|
||||||
|
return None
|
||||||
return personJson
|
return personJson
|
||||||
|
|
||||||
def personBoxJson(baseDir: str,domain: str,port: int,path: str, \
|
def personBoxJson(baseDir: str,domain: str,port: int,path: str, \
|
||||||
|
|
Loading…
Reference in New Issue