diff --git a/src/Mod/Start/StartPage/EnableDownload.py b/src/Mod/Start/StartPage/EnableDownload.py
index 4baca89549..f7f117969e 100644
--- a/src/Mod/Start/StartPage/EnableDownload.py
+++ b/src/Mod/Start/StartPage/EnableDownload.py
@@ -20,6 +20,6 @@
#* *
#***************************************************************************
-import FreeCAD,FreeCADGui
+import FreeCAD
rf=FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Start")
rf.SetBool("AllowDownload",True)
diff --git a/src/Mod/Start/StartPage/LoadMRU.py b/src/Mod/Start/StartPage/LoadMRU.py
index 4c7889daa3..7b7e14c7d6 100644
--- a/src/Mod/Start/StartPage/LoadMRU.py
+++ b/src/Mod/Start/StartPage/LoadMRU.py
@@ -20,7 +20,7 @@
#* *
#***************************************************************************
-import FreeCADGui,sys
+import FreeCADGui
# MRU will be given before this script is run
rf=FreeCAD.ParamGet("User parameter:BaseApp/Preferences/RecentFiles")
FreeCADGui.loadFile(rf.GetString("MRU"+str(MRU)))
diff --git a/src/Mod/Start/StartPage/StartPage.js b/src/Mod/Start/StartPage/StartPage.js
index ca70689613..ad906f89e9 100644
--- a/src/Mod/Start/StartPage/StartPage.js
+++ b/src/Mod/Start/StartPage/StartPage.js
@@ -31,7 +31,7 @@ function load() {
if (allowDownloads == 1) {
// load latest commits
- ddiv = document.getElementById("commits");
+ var ddiv = document.getElementById("commits");
ddiv.innerHTML = "Connecting...";
var tobj=new JSONscriptRequest('https://api.github.com/repos/FreeCAD/FreeCAD/commits?callback=printCommits');
tobj.buildScriptTag(); // Build the script tag
@@ -61,7 +61,7 @@ function printCommits(data) {
// json callback for git commits
- ddiv = document.getElementById('commits');
+ var ddiv = document.getElementById('commits');
ddiv.innerHTML = "Received";
var html = ['
'];
for (var i = 0; i < 25; i++) {
@@ -76,7 +76,7 @@ function printAddons(data) {
// json callback for addons list
- ddiv = document.getElementById('addons');
+ var ddiv = document.getElementById('addons');
ddiv.innerHTML = "Received";
var html = [''];
var blacklist = ['addons_installer.FCMacro','FreeCAD-Addon-Details.md','README.md'];
@@ -98,7 +98,7 @@ function printForum(data) {
// json callback for forum posts
- ddiv = document.getElementById('forum');
+ var ddiv = document.getElementById('forum');
ddiv.innerHTML = "Received";
var html = [''];
for (var i = 0; i < 25; i++) {
diff --git a/src/Mod/Start/StartPage/StartPage.py b/src/Mod/Start/StartPage/StartPage.py
index 5fc176f778..a19c46949c 100644
--- a/src/Mod/Start/StartPage/StartPage.py
+++ b/src/Mod/Start/StartPage/StartPage.py
@@ -25,7 +25,7 @@
# the html code of the start page. It is built only once per FreeCAD session for now...
import six
-import sys,os,FreeCAD,FreeCADGui,tempfile,time,zipfile,urllib,re
+import sys,os,FreeCAD,FreeCADGui,tempfile,time,zipfile,re
from . import TranslationTexts
from PySide import QtCore,QtGui
@@ -107,7 +107,7 @@ def getInfo(filename):
try:
import gnome.ui
import gnomevfs
- except:
+ except Exception:
# alternative method
import hashlib
fhash = hashlib.md5(("file://"+path).encode("utf8")).hexdigest()
@@ -140,7 +140,7 @@ def getInfo(filename):
if filename.lower().endswith(".fcstd"):
try:
zfile=zipfile.ZipFile(filename)
- except:
+ except Exception:
print("Cannot read file: ",filename)
return None
files=zfile.namelist()
@@ -366,7 +366,6 @@ def handle():
# build SECTION_RECENTFILES
- SECTION_RECENTFILES = encode("")
rf = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/RecentFiles")
rfcount = rf.GetInt("RecentFiles",0)
SECTION_RECENTFILES = encode(""+TranslationTexts.T_RECENTFILES+"
")
@@ -493,7 +492,7 @@ def handle():
img = os.path.join(resources_dir,"images/freecad.png")
iconbank[wb] = img
UL_WORKBENCHES += '- '
- UL_WORKBENCHES += '
'
+ UL_WORKBENCHES += '
'
UL_WORKBENCHES += ''+wn.replace("ReverseEngineering","ReverseEng")+''
UL_WORKBENCHES += ' '
UL_WORKBENCHES += '
'
@@ -503,19 +502,19 @@ def handle():
try:
import dxfLibrary
- except:
+ except Exception:
pass
else:
wblist.append("dxf-library")
try:
import RebarTools
- except:
+ except Exception:
pass
else:
wblist.append("reinforcement")
try:
import CADExchangerIO
- except:
+ except Exception:
pass
else:
wblist.append("cadexchanger")