This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c75c2654 style: fix a confusing comment about Python 2 vs. 3 (#8291)
4c75c2654 is described below

commit 4c75c26544ea24cdfc5d4bb3efc320a0f3e4366e
Author: Christian Clauss <[email protected]>
AuthorDate: Thu Nov 10 08:21:00 2022 +0100

    style: fix a confusing comment about Python 2 vs. 3 (#8291)
---
 utils/check-category.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/utils/check-category.py b/utils/check-category.py
index b81d81e41..6de86a736 100755
--- a/utils/check-category.py
+++ b/utils/check-category.py
@@ -24,10 +24,9 @@ from os import path
 EXT = ".md"
 
 try:
-    UNICODE_EXISTS = bool(type(unicode))
-except:
-    # Py2
-    unicode = str
+    unicode  # Python 2
+except NameError:
+    unicode = str  # Python 3
 
 def collect_fn(entries, topic):
     if "id" in topic:

Reply via email to