Fix bad usage of key argument to sorted()
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 4 Jun 2007 15:11:41 +0000 (17:11 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 4 Jun 2007 15:11:41 +0000 (17:11 +0200)
src/packages/kofoto/commandline/main.py
src/packages/kofoto/gkofoto/generatehtmldialog.py

index b44d965..e1d88e0 100755 (executable)
@@ -1314,7 +1314,7 @@ def main(argv):
             "album generation", "default_image_size_limit")[0]
         imgsizesset.add(defaultlimit)
         imgsizes = sorted(
-            imgsizesset, key=lambda x, y: cmp(x[0] * x[1], y[0] * y[1]))
+            imgsizesset, cmp=lambda x, y: cmp(x[0] * x[1], y[0] * y[1]))
         env.imagesizelimits = imgsizes
 
         commandTable[args[0]](env, args[1:])
index 99f1d3b..817e1bd 100644 (file)
@@ -83,7 +83,7 @@ class GenerateHTMLDialog:
             "album generation", "default_image_size_limit")[0]
         imgsizesset.add(defaultlimit)
         imgsizes = sorted(
-            imgsizesset, key=lambda x, y: cmp(x[0] * x[1], y[0] * y[1]))
+            imgsizesset, cmp=lambda x, y: cmp(x[0] * x[1], y[0] * y[1]))
         env.imagesizelimits = imgsizes
 
         try: