diff --git a/src/Mod/PartDesign/FeatureHole/HoleGui.py b/src/Mod/PartDesign/FeatureHole/HoleGui.py
index c385270d84..98ef55143a 100644
--- a/src/Mod/PartDesign/FeatureHole/HoleGui.py
+++ b/src/Mod/PartDesign/FeatureHole/HoleGui.py
@@ -57,6 +57,7 @@ class HoleGui:
return
if selection[0].DocumentName != doc.Name:
QtGui.QMessageBox.critical(mw, "Wrong document", "Please select a face in the active document")
+ return
# Note: For some reason setting the Support property here breaks all sorts of things.
# It is done in TaskHole.updateUI() instead
@@ -64,6 +65,7 @@ class HoleGui:
body = FreeCADGui.activeView().getActiveObject("pdbody");
if body is None:
QtGui.QMessageBox.critical(mw, "No active body", "Please create a body or make a body active")
+ return
feature = doc.addObject("Part::FeaturePython","Hole")
hole = Hole(feature)
diff --git a/src/Mod/PartDesign/fcsprocket/fcsprocket.py b/src/Mod/PartDesign/fcsprocket/fcsprocket.py
index 533c5d47c5..651659169d 100644
--- a/src/Mod/PartDesign/fcsprocket/fcsprocket.py
+++ b/src/Mod/PartDesign/fcsprocket/fcsprocket.py
@@ -29,9 +29,9 @@ def makeSprocket(P, N, Dr):
w = FCWireBuilder()
sprocket.CreateSprocket(w, P, N, Dr)
sprocketw = Part.Wire([o.toShape() for o in w.wire])
- sprocket = doc.addObject("Part::Feature", "Sprocket")
- sprocket.Shape = sprocketw
- return sprocket
+ sprocketf = doc.addObject("Part::Feature", "Sprocket")
+ sprocketf.Shape = sprocketw
+ return sprocketf
class FCWireBuilder(object):
"""A helper class to prepare a Part.Wire object"""
diff --git a/src/Mod/Ship/TankInstance.py b/src/Mod/Ship/TankInstance.py
index 1acc5273ff..fe64371414 100644
--- a/src/Mod/Ship/TankInstance.py
+++ b/src/Mod/Ship/TankInstance.py
@@ -173,6 +173,7 @@ class Tank:
return Vector()
if vol >= fp.Shape.Volume:
vol = 0.0
+ cog = Vector()
for solid in fp.Shape.Solids:
vol += solid.Volume
sCoG = solid.CenterOfMass
diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py
index 1de6f5eba3..48c2b946ea 100644
--- a/src/Mod/Start/StartPage/StartPage.py
+++ b/src/Mod/Start/StartPage/StartPage.py
@@ -320,11 +320,11 @@ def handle():
f = QtCore.QFile(path)
if f.open(QtCore.QIODevice.ReadOnly | QtCore.QFile.Text):
ALTCSS = encode(QtCore.QTextStream(f).readAll())
+ HTML = HTML.replace("","")
else:
with open(path, 'r') as f:
ALTCSS = encode(f.read())
-
- HTML = HTML.replace("","")
+ HTML = HTML.replace("","")
# turn tips off if needed
diff --git a/src/Tools/offlinedoc/buildwikiindex.py b/src/Tools/offlinedoc/buildwikiindex.py
index 44b755dc89..be1a9763a7 100755
--- a/src/Tools/offlinedoc/buildwikiindex.py
+++ b/src/Tools/offlinedoc/buildwikiindex.py
@@ -152,7 +152,7 @@ def getlinks(html):
rg = re.findall('href="\/wiki\/(.*?)"',l)
if "images" in rg:
rg = None
- if "mediawiki" in rg:
+ elif "mediawiki" in rg:
rg = None
if rg:
rg = rg[0]