Browse Source

put_text covert `content` to str

wangweimin 5 năm trước cách đây
mục cha
commit
79ad99c461
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pywebio/output.py

+ 1 - 1
pywebio/output.py

@@ -128,7 +128,7 @@ def put_text(text, inline=False, anchor=None, before=None, after=None):
     :param str after: 在给定的锚点之后输出内容
         注意: ``before`` 和 ``after`` 参数不可以同时使用
     """
-    _put_content('text', content=text, inline=inline, anchor=anchor, before=before, after=after)
+    _put_content('text', content=str(text), inline=inline, anchor=anchor, before=before, after=after)
 
 
 def put_html(html, anchor=None, before=None, after=None):