mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
28d57f492b
commit
5fbc000eea
11
roles.py
11
roles.py
|
@ -46,11 +46,16 @@ def clearEditorStatus(baseDir: str) -> None:
|
|||
for f in os.scandir(directory):
|
||||
f = f.name
|
||||
filename = os.fsdecode(f)
|
||||
if filename.endswith(".json") and '@' in filename:
|
||||
if '@' not in filename:
|
||||
continue
|
||||
if not filename.endswith(".json"):
|
||||
continue
|
||||
filename = os.path.join(baseDir + '/accounts/', filename)
|
||||
if '"editor"' in open(filename).read():
|
||||
if '"editor"' not in open(filename).read():
|
||||
continue
|
||||
actorJson = loadJson(filename)
|
||||
if actorJson:
|
||||
if not actorJson:
|
||||
continue
|
||||
if actorJson['roles'].get('instance'):
|
||||
if 'editor' in actorJson['roles']['instance']:
|
||||
actorJson['roles']['instance'].remove('editor')
|
||||
|
|
Loading…
Reference in New Issue