fix: import os ordering
This commit is contained in:
parent
454eaed30c
commit
39e6755e96
@ -6,6 +6,7 @@ if not uid:
|
|||||||
|
|
||||||
dbname = get_module_dbname('pipeline-sdlc')
|
dbname = get_module_dbname('pipeline-sdlc')
|
||||||
workspace_base = '/d/pipeline/workspaces'
|
workspace_base = '/d/pipeline/workspaces'
|
||||||
|
import os
|
||||||
|
|
||||||
async with DBPools().sqlorContext(dbname) as sor:
|
async with DBPools().sqlorContext(dbname) as sor:
|
||||||
recs = await sor.sqlExe(
|
recs = await sor.sqlExe(
|
||||||
@ -30,7 +31,6 @@ async with DBPools().sqlorContext(dbname) as sor:
|
|||||||
if not ws_dir or not os.path.isdir(ws_dir):
|
if not ws_dir or not os.path.isdir(ws_dir):
|
||||||
return json.dumps({"error": "工作空间不存在: " + ws_dir, "tree": {"name": "", "children": [], "files": []}}, ensure_ascii=False)
|
return json.dumps({"error": "工作空间不存在: " + ws_dir, "tree": {"name": "", "children": [], "files": []}}, ensure_ascii=False)
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
def build_tree(path):
|
def build_tree(path):
|
||||||
result = {"name": os.path.basename(path) or path, "path": path, "children": [], "files": []}
|
result = {"name": os.path.basename(path) or path, "path": path, "children": [], "files": []}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user