AddonManager: Fix python imports

Move misplaced imports from addonmanager_macro to addonmanager_workers
This commit is contained in:
Matsievskiy S.V
2020-10-03 11:19:51 +03:00
committed by wwmayer
parent 027de684cb
commit 706a014ce9
2 changed files with 8 additions and 24 deletions

View File

@@ -25,10 +25,8 @@ import os
import re
import sys
from PySide import QtCore, QtGui
import FreeCAD
import FreeCADGui
from addonmanager_utilities import translate
from addonmanager_utilities import urlopen
@@ -39,27 +37,6 @@ try:
except ImportError:
from html import unescape
try:
import StringIO as io
_stringio = io.StringIO
except ImportError: # StringIO is not available with python3
import io
_stringio = io.BytesIO
have_git = False
try:
import git
have_git = True
except ImportError:
pass
have_zip = False
try:
import zipfile
have_zip = True
except ImportError:
pass
# @package AddonManager_macro
# \ingroup ADDONMANAGER
# \brief Unified handler for FreeCAD macros that can be obtained from different sources

View File

@@ -28,7 +28,7 @@ import stat
import sys
import tempfile
from PySide import QtCore
from PySide import QtCore, QtGui
import FreeCAD
if FreeCAD.GuiUp:
@@ -59,6 +59,13 @@ try:
except ImportError:
pass
try:
import StringIO as io
_stringio = io.StringIO
except ImportError: # StringIO is not available with python3
import io
_stringio = io.BytesIO
# @package AddonManager_workers
# \ingroup ADDONMANAGER
# \brief Multithread workers for the addon manager