AddonManager: Fixes for translation
This commit is contained in:
@@ -363,6 +363,7 @@ class CommandAddonManager:
|
||||
else:
|
||||
from PySide import QtGui
|
||||
self.macros.append(macro)
|
||||
import AddonManager_rc
|
||||
addonicon = QtGui.QIcon(":/icons/" + macro.name.replace(" ","_") + "_macro_icon.svg")
|
||||
if addonicon.isNull():
|
||||
addonicon = QtGui.QIcon(":/icons/applications-python.svg")
|
||||
|
||||
@@ -4,4 +4,7 @@
|
||||
# License LGPL
|
||||
|
||||
import AddonManager
|
||||
import AddonManager_rc
|
||||
|
||||
FreeCADGui.addLanguagePath(":/translations")
|
||||
FreeCADGui.addCommand('Std_AddonMgr', AddonManager.CommandAddonManager())
|
||||
|
||||
@@ -81,6 +81,8 @@ def urlopen(url):
|
||||
|
||||
"""Opens an url with urllib2"""
|
||||
|
||||
timeout = 5
|
||||
|
||||
if sys.version_info.major < 3:
|
||||
import urllib2
|
||||
else:
|
||||
@@ -88,9 +90,9 @@ def urlopen(url):
|
||||
|
||||
try:
|
||||
if ssl_ctx:
|
||||
u = urllib2.urlopen(url, context=ssl_ctx)
|
||||
u = urllib2.urlopen(url, context=ssl_ctx, timeout=timeout)
|
||||
else:
|
||||
u = urllib2.urlopen(url)
|
||||
u = urllib2.urlopen(url, timeout=timeout)
|
||||
except:
|
||||
return None
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user