Skip to content
Browse files
[processing] use cmp_to_key to ensure Python3 compatibility
  • Loading branch information
volaya committed Oct 5, 2016
1 parent e04780a commit b2fd1a456045d88ca270ede6ec2547ec8e66f4fa
Showing with 2 additions and 1 deletion.
  1. +2 −1 python/plugins/processing/gui/
@@ -30,6 +30,7 @@

import locale
import os
from functools import cmp_to_key

from qgis.core import QgsCoordinateReferenceSystem, QgsVectorLayer
from qgis.PyQt.QtWidgets import QCheckBox, QComboBox, QLineEdit, QPlainTextEdit
@@ -813,7 +814,7 @@ def getFields(self):
for field in self._layer.fields():
if not fieldTypes or field.type() in fieldTypes:
return sorted(list(fieldNames), cmp=locale.strcoll)
return sorted(list(fieldNames), key=cmp_to_key(locale.strcoll))

def setValue(self, value):
if self.param.multiple:

0 comments on commit b2fd1a4

Please sign in to comment.