Skip to content

Commit

Permalink
Fixed Queue import for py3
Browse files Browse the repository at this point in the history
  • Loading branch information
mlampert authored and wwmayer committed Jan 5, 2019
1 parent cd1ebb1 commit 6e0a558
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Mod/Path/PathScripts/PathUtils.py
Expand Up @@ -24,13 +24,14 @@
'''PathUtils -common functions used in PathScripts for filterig, sorting, and generating gcode toolpath data '''
import FreeCAD
import FreeCADGui
import math
import numpy
import Part
import Path
import PathScripts
import PathScripts.PathGeom as PathGeom
import TechDraw
import math
import numpy
import sys

from DraftGeomUtils import geomType
from FreeCAD import Vector
Expand Down Expand Up @@ -714,7 +715,10 @@ def sort_jobs(locations, keys, attractors=[]):
keys: two-element list of keys for X and Y coordinates. for example ['x','y']
originally written by m0n5t3r for PathHelix
"""
from Queue import PriorityQueue
if sys.version_info.major < 3:
from Queue import PriorityQueue
else:
from queue import PriorityQueue
from collections import defaultdict

attractors = attractors or [keys[0]]
Expand Down

0 comments on commit 6e0a558

Please sign in to comment.