[FEM] patch LGTM alerts

This commit is contained in:
UR-0
2021-05-03 19:10:03 +02:00
committed by Bernd Hahnebach
parent 72e249a106
commit 9a5eefaec8
2 changed files with 4 additions and 8 deletions

View File

@@ -264,8 +264,7 @@ class GmshTools():
"but parameter to create it is set to True. "
"Dir will be created.\n".format(self.working_dir)
)
from os import mkdir
mkdir(param_working_dir)
os.mkdir(param_working_dir)
else:
Console.PrintError(
"Dir given as parameter \'{}\' doesn't exist "
@@ -295,10 +294,9 @@ class GmshTools():
# file paths
_geometry_name = self.part_obj.Name + "_Geometry"
self.mesh_name = self.part_obj.Name + "_Mesh"
from os.path import join
self.temp_file_geometry = join(self.working_dir, _geometry_name + ".brep") # geometry file
self.temp_file_mesh = join(self.working_dir, self.mesh_name + ".unv") # mesh file
self.temp_file_geo = join(self.working_dir, "shape2mesh.geo") # Gmsh input file
self.temp_file_geometry = os.path.join(self.working_dir, _geometry_name + ".brep") # geometry file
self.temp_file_mesh = os.path.join(self.working_dir, self.mesh_name + ".unv") # mesh file
self.temp_file_geo = os.path.join(self.working_dir, "shape2mesh.geo") # Gmsh input file
Console.PrintMessage(" " + self.temp_file_geometry + "\n")
Console.PrintMessage(" " + self.temp_file_mesh + "\n")
Console.PrintMessage(" " + self.temp_file_geo + "\n")

View File

@@ -285,7 +285,6 @@ def getBoundBoxOfAllDocumentShapes(doc):
FreeCAD.Console.PrintMessage("{}\n".format(bb)) # debug only
except Exception:
FreeCAD.Console.PrintMessage("exception \n") # debug only
pass
if bb is None:
try:
@@ -294,7 +293,6 @@ def getBoundBoxOfAllDocumentShapes(doc):
FreeCAD.Console.PrintMessage("{}\n".format(bb)) # debug only
except Exception:
FreeCAD.Console.PrintMessage("exception \n") # debug only
pass
if bb:
if bb.isValid():