From c3fd205b7daa51aaa974db19654df07fdb51158f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=AA=8E?= Date: Sun, 5 Mar 2017 18:18:22 +0800 Subject: [PATCH] fix /stat --- cps/web.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/web.py b/cps/web.py index 19f23593..f49049ca 100755 --- a/cps/web.py +++ b/cps/web.py @@ -47,6 +47,7 @@ import db from shutil import move, copyfile from tornado.ioloop import IOLoop from tornado import version as tornadoVersion +from builtins import str try: from imp import reload @@ -1050,8 +1051,8 @@ def stats(): stdin=subprocess.PIPE) p.wait() for lines in p.stdout.readlines(): - if re.search('Amazon kindlegen\(', lines): - versions['KindlegenVersion'] = lines + if re.search('Amazon kindlegen\(', str(lines)): + versions['KindlegenVersion'] = str(lines) versions['PythonVersion'] = sys.version versions['babel'] = babelVersion versions['sqlalchemy'] = sqlalchemyVersion