Skip to content

Commit d76be6f

Browse files
author
Thomas Preud'homme
committed
[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 llvm-svn: 374304
1 parent 7f2838f commit d76be6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lnt/server/db/migrations/upgrade_1_to_2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, **kwargs):
3838
logger.info("updating runs")
3939
all_runs = session.query(Run).\
4040
filter(sqlalchemy.not_(Run.Parameters.like(
41-
'%["__report_version__"%'))).all()
41+
b'%["__report_version__"%'))).all()
4242
for i, run in enumerate(all_runs):
4343
if i % 1000 == 999:
4444
logger.info("update run %d of %d" % (i + 1, len(all_runs)))

0 commit comments

Comments
 (0)