Просмотр исходного кода

camlib.py edited online with Bitbucket; removed the paranthesis around lambda function as it was making an tuple which it was not the intention.

Marius Stanciu 10 лет назад
Родитель
Сommit
71a81173bd
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      camlib.py

+ 1 - 1
camlib.py

@@ -2711,7 +2711,7 @@ class CNCjob(Geometry):
         
         
         # sort the tools list by the second item in tuple (here we have a dict with diameter of the tool)
         # sort the tools list by the second item in tuple (here we have a dict with diameter of the tool)
         # so we actually are sorting the tools by diameter
         # so we actually are sorting the tools by diameter
-        sorted_tools = sorted(exobj.tools.items(), key = (lambda x: x[1]))
+        sorted_tools = sorted(exobj.tools.items(), key = lambda x: x[1])
         if tools == "all":
         if tools == "all":
             tools = str([i[0] for i in sorted_tools])   # we get a string of ordered tools
             tools = str([i[0] for i in sorted_tools])   # we get a string of ordered tools
             log.debug("Tools 'all' and sorted are: %s" % str(tools))
             log.debug("Tools 'all' and sorted are: %s" % str(tools))