fix: skip comment lines in load_path.py paths parsing

Lines starting with # were parsed as path+role, causing
'#'.split() = ['#','sage_datamart'], where 'sage_datamart'
isn't 'any'/'logined'/'anonymous' and has no '.',
crashing add_roles_perm at role.split('.')
This commit is contained in:
yumoqing 2026-07-27 10:55:20 +08:00
parent 3290fd959e
commit cf88984a09

View File

@ -1531,7 +1531,7 @@ async def main():
cnt = 0
async with db.sqlorContext('sage') as sor:
for l in paths.split('\n'):
if not l:
if not l or l.startswith('#'):
continue
parts = l.split()
path = parts[0]