Skip to content

Commit c701633

Browse files
committed
Fix deprecated locale.format() -> locale.format_string()
1 parent b017fdc commit c701633

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/python/qtvcp/widgets/origin_offsetview.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,18 +267,18 @@ def reload_offsets(self):
267267
else:
268268
tmpl = self.imperial_text_template
269269

270-
degree_tmpl = "%{}.2f".format(len(locale.format(tmpl, 0)))
270+
degree_tmpl = "%{}.2f".format(len(locale.format_string(tmpl, 0)))
271271

272272
# fill each row of the liststore from the offsets arrays
273273
for row, i in enumerate([ap, rot, g92, tool, g54, g55, g56, g57, g58, g59, g59_1, g59_2, g59_3]):
274274
for column in range(0, 9):
275275
if row == 1:
276276
if column == 2:
277-
self.tabledata[row][column] = locale.format(degree_tmpl, rot)
277+
self.tabledata[row][column] = locale.format_string(degree_tmpl, rot)
278278
else:
279279
self.tabledata[row][column] = " "
280280
else:
281-
self.tabledata[row][column] = locale.format(tmpl, i[column])
281+
self.tabledata[row][column] = locale.format_string(tmpl, i[column])
282282
self.tablemodel.layoutChanged.emit()
283283

284284
# We read the var file directly

0 commit comments

Comments
 (0)