issue #1701 removed further except: statements
This commit is contained in:
parent
ed66ada1cf
commit
57db95a1c3
|
@ -37,7 +37,7 @@ import FreeCAD
|
|||
def InitApplications():
|
||||
try:
|
||||
import sys,os
|
||||
except:
|
||||
except ImportError:
|
||||
FreeCAD.PrintError("\n\nSeems the python standard libs are not installed, bailing out!\n\n")
|
||||
raise
|
||||
# Checking on FreeCAD module path ++++++++++++++++++++++++++++++++++++++++++
|
||||
|
|
|
@ -55,7 +55,7 @@ def insert(filename,docname):
|
|||
"called when freecad wants to import a file"
|
||||
try:
|
||||
doc = FreeCAD.getDocument(docname)
|
||||
except:
|
||||
except NameError:
|
||||
doc = FreeCAD.newDocument(docname)
|
||||
FreeCAD.ActiveDocument = doc
|
||||
read(filename)
|
||||
|
|
|
@ -50,17 +50,14 @@ def makeBottle(myWidth=50.0, myHeight=70.0, myThickness=30.0):
|
|||
zMax = -1.0
|
||||
|
||||
for xp in myBody.Faces:
|
||||
try:
|
||||
surf = xp.Surface
|
||||
if type(surf) == Part.Plane:
|
||||
z = surf.Position.z
|
||||
if z > zMax:
|
||||
zMax = z
|
||||
faceToRemove = xp
|
||||
except:
|
||||
continue
|
||||
|
||||
# This doesn't work for any reason
|
||||
surf = xp.Surface
|
||||
if type(surf) == Part.Plane:
|
||||
z = surf.Position.z
|
||||
if z > zMax:
|
||||
zMax = z
|
||||
faceToRemove = xp
|
||||
|
||||
# This doesn't work for any reason
|
||||
myBody = myBody.makeThickness([faceToRemove],-myThickness/50 , 1.e-3)
|
||||
myThreading = Part.makeThread(myNeckHeight/10, myNeckRadius*0.06, myHeight/10, myNeckRadius*0.99)
|
||||
myThreading.translate(Base.Vector(0,0,myHeight))
|
||||
|
|
|
@ -72,7 +72,7 @@ class SketcherWorkbench ( Workbench ):
|
|||
import Sketcher
|
||||
try:
|
||||
import Profiles
|
||||
except:
|
||||
except ImportError:
|
||||
print "Error in Profiles module"
|
||||
|
||||
def GetClassName(self):
|
||||
|
|
Loading…
Reference in New Issue
Block a user