diff options
author | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-10-10 10:33:25 +0000 |
---|---|---|
committer | Thomas Preud'homme <thomasp@graphcore.ai> | 2019-10-10 10:33:25 +0000 |
commit | dd7967deb471a56b066dd040eac10839c483f4c4 (patch) | |
tree | c98c3c84d70df0278c06239e9660cd136d736fb0 | |
parent | e348ca759297854f827c07216f01c06a7313e954 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/lnt/trunk@374304 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lnt/server/db/migrations/upgrade_1_to_2.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lnt/server/db/migrations/upgrade_1_to_2.py b/lnt/server/db/migrations/upgrade_1_to_2.py index 374b27f..9b9262f 100644 --- a/lnt/server/db/migrations/upgrade_1_to_2.py +++ b/lnt/server/db/migrations/upgrade_1_to_2.py @@ -38,7 +38,7 @@ def update_testsuite(engine, session, db_key_name): 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))) |