Skip to content

Commit 0d067a2

Browse files
author
Thomas Preud'homme
committed
Fix use of wrong and undef variable
Two of the ValueError exceptionsraised in get_base_for_testsuite() refer to the wrong variable and an undefined variable respectively. This patch fixes those. Reviewed By: cmatthews Differential Revision: https://reviews.llvm.org/D94663
1 parent 52ea667 commit 0d067a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lnt/server/db/migrations/upgrade_0_to_1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class Machine(UpdatedBase):
195195
for item in test_suite.machine_fields:
196196
if item.name in class_dict:
197197
raise ValueError("test suite defines reserved key %r" %
198-
(name,))
198+
(item.name,))
199199

200200
class_dict[item.name] = item.column = Column(
201201
item.name, String(256))
@@ -268,7 +268,7 @@ class Sample(UpdatedBase):
268268
for item in test_suite.sample_fields:
269269
if item.name in class_dict:
270270
raise ValueError("test suite defines reserved key {}"
271-
.format(name))
271+
.format(item.name))
272272

273273
if item.type.name == 'Real':
274274
item.column = Column(item.name, Float)

0 commit comments

Comments
 (0)