Skip to content

Commit

Permalink
Arch: ImportOBJ.py LGTM fixes [skip ci]
Browse files Browse the repository at this point in the history
Fixes recommended via LGTM report
  • Loading branch information
luzpaz authored and yorikvanhavre committed Oct 25, 2019
1 parent a801ff5 commit 0c038df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Mod/Arch/importOBJ.py
Expand Up @@ -21,7 +21,7 @@
#***************************************************************************

import FreeCAD, DraftGeomUtils, Part, Draft, Arch, Mesh, MeshPart, os, sys
import numpy as np
# import numpy as np
if FreeCAD.GuiUp:
from DraftTools import translate
else:
Expand Down Expand Up @@ -129,7 +129,7 @@ def getIndices(obj,shape,offsetv,offsetvn):
#print(e.Vertexes[0].Point,e.Vertexes[1].Point)
v = e.Vertexes[0]
ind = findVert(v,shape.Vertexes)
if ind == None:
if ind is None:
return None,None,None
fi += " " + str(ind + offsetv)
flist.append(fi)
Expand Down Expand Up @@ -193,7 +193,7 @@ def export(exportList,filename,colors=None):
vlist,vnlist,elist,flist = getIndices(obj,obj.Shape,offsetv,offsetvn)
elif hasattr(obj,"Mesh") and obj.Mesh:
vlist,vnlist, elist,flist = getIndices(obj,obj.Mesh,offsetv,offsetvn)
if vlist == None:
if vlist is None:
FreeCAD.Console.PrintError("Unable to export object "+obj.Label+". Skipping.\n")
else:
offsetv += len(vlist)
Expand Down

0 comments on commit 0c038df

Please sign in to comment.