Skip to content

Commit

Permalink
issue #1701 removed further except: statements
Browse files Browse the repository at this point in the history
  • Loading branch information
5263 committed Sep 17, 2014
1 parent ed66ada commit 57db95a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/App/FreeCADInit.py
Expand Up @@ -37,7 +37,7 @@
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 ++++++++++++++++++++++++++++++++++++++++++
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Material/importFCMat.py
Expand Up @@ -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)
Expand Down
19 changes: 8 additions & 11 deletions src/Mod/Part/MakeBottle.py
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion src/Mod/Sketcher/InitGui.py
Expand Up @@ -72,7 +72,7 @@ def Initialize(self):
import Sketcher
try:
import Profiles
except:
except ImportError:
print "Error in Profiles module"

def GetClassName(self):
Expand Down

0 comments on commit 57db95a

Please sign in to comment.