Skip to content

Commit 20bb478

Browse files
committed
fix main detection of path_deploy()
1 parent f8869f9 commit 20bb478

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pywebio/platform/path_deploy.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def identifiers_info(code):
3838
for node in tree.body:
3939
if isinstance(node, ast.Assign):
4040
for name in node.targets:
41-
identifier2doc[name.id] = ''
41+
if hasattr(name, 'id'):
42+
identifier2doc[name.id] = ''
4243
elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef)):
4344
doc_string = ast.get_docstring(node) or ''
4445
title = doc_string.split('\n\n')[0]

0 commit comments

Comments
 (0)