mirror of
https://github.com/janeczku/calibre-web
synced 2025-11-16 06:57:12 +00:00
use condition rather than try/catch
This commit is contained in:
@@ -1052,8 +1052,10 @@ def stats():
|
||||
stdin=subprocess.PIPE)
|
||||
p.wait()
|
||||
for lines in p.stdout.readlines():
|
||||
if re.search('Amazon kindlegen\(', str(lines)):
|
||||
versions['KindlegenVersion'] = str(lines)
|
||||
if type(lines) is bytes:
|
||||
lines = lines.decode('utf-8')
|
||||
if re.search('Amazon kindlegen\(', lines):
|
||||
versions['KindlegenVersion'] = lines
|
||||
versions['PythonVersion'] = sys.version
|
||||
versions['babel'] = babelVersion
|
||||
versions['sqlalchemy'] = sqlalchemyVersion
|
||||
|
||||
Reference in New Issue
Block a user