[LNT] r374304 - [LNT] Python 3 support: fix report version literal
Thomas Preud'homme via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 10 03:33:25 PDT 2019
Author: thopre
Date: Thu Oct 10 03:33:25 2019
New Revision: 374304
URL: http://llvm.org/viewvc/llvm-project?rev=374304&view=rev
Log:
[LNT] Python 3 support: fix report version literal
The upgrade_1_to_2 module stores a __report_version__ string literal in
the Parameter column of the Run table which is declared as binary data.
This does not work in Python 3 where strings/text and binary are
different things. This commit changes it for a binary literal instead
(introduced in Python 2.6).
Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls
Reviewed By: hubert.reinterpretcast
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D68105
Modified:
lnt/trunk/lnt/server/db/migrations/upgrade_1_to_2.py
Modified: lnt/trunk/lnt/server/db/migrations/upgrade_1_to_2.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/migrations/upgrade_1_to_2.py?rev=374304&r1=374303&r2=374304&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/migrations/upgrade_1_to_2.py (original)
+++ lnt/trunk/lnt/server/db/migrations/upgrade_1_to_2.py Thu Oct 10 03:33:25 2019
@@ -38,7 +38,7 @@ def update_testsuite(engine, session, db
logger.info("updating runs")
all_runs = session.query(Run).\
filter(sqlalchemy.not_(Run.Parameters.like(
- '%["__report_version__"%'))).all()
+ b'%["__report_version__"%'))).all()
for i, run in enumerate(all_runs):
if i % 1000 == 999:
logger.info("update run %d of %d" % (i + 1, len(all_runs)))
More information about the llvm-commits
mailing list