Sfoglia il codice sorgente

Merge pull request #29 from zauberzeug/on_connect

ui.run(on_connect=<callable>) breaks
Falko Schindler 3 anni fa
parent
commit
1cf296c22a
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      nicegui/config.py

+ 2 - 1
nicegui/config.py

@@ -51,7 +51,8 @@ else:
                     keyword.arg:
                         keyword.value.n if isinstance(keyword.value, ast.Num) else
                         keyword.value.s if isinstance(keyword.value, ast.Str) else
-                        keyword.value.value
+                        keyword.value.value if hasattr(keyword.value, 'value') else
+                        None
                     for keyword in node.value.keywords
                 }
                 config = Config(**args)