Skip to content

Commit 1a4e00e

Browse files
committed
fix: AttributeError: 'str' object has no attribute 'isascii' for py3.6
1 parent db9b8d3 commit 1a4e00e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nimba/http/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
PROJECT_MASK = 'PROJECT_MASK_PATH'
4040

4141
def path_reverse(name_path:str, args=None, kwargs=None) -> str:
42-
if not isinstance(name_path, str) or not name_path.isascii():
42+
if not isinstance(name_path, str) or not re.match(r"^[^\d\W][\w-]*\Z", name_path):
4343
raise ValueError("Name path must but a valid identifier name.")
4444
args = args or {}
4545
kwargs = kwargs or {}

0 commit comments

Comments
 (0)