Salome HOME
projects
/
tools
/
sat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
076787a
)
replace all usage of bare except clause with except Exception clause
author
Gbkng
<guillaume.brooking@gmail.com>
Wed, 14 Feb 2024 08:49:33 +0000
(09:49 +0100)
committer
Nabil Ghodbane
<nabil.ghodbane@cea.fr>
Mon, 4 Mar 2024 16:37:49 +0000
(17:37 +0100)
38 files changed:
.gitignore
patch
|
blob
|
history
AllTestLauncherSat.py
patch
|
blob
|
history
commands/application.py
patch
|
blob
|
history
commands/compile.py
patch
|
blob
|
history
commands/config.py
patch
|
blob
|
history
commands/generate.py
patch
|
blob
|
history
commands/jobs.py
patch
|
blob
|
history
commands/log.py
patch
|
blob
|
history
commands/package.py
patch
|
blob
|
history
commands/template.py
patch
|
blob
|
history
commands/test.py
patch
|
blob
|
history
data/local.pyconf
[new file with mode: 0644]
patch
|
blob
data/templates/Application/config/splash_generator/splash2.py
patch
|
blob
|
history
data/templates/PythonComponent/src/PYCMP/PYCMP_utils.py
patch
|
blob
|
history
data/templates/PythonComponent8/src/PYCMP/PYCMP_utils.py
patch
|
blob
|
history
src/ElementTree.py
patch
|
blob
|
history
src/ElementTreePython2.py
patch
|
blob
|
history
src/ElementTreePython3.py
patch
|
blob
|
history
src/__init__.py
patch
|
blob
|
history
src/architecture.py
patch
|
blob
|
history
src/callerName.py
patch
|
blob
|
history
src/compilation.py
patch
|
blob
|
history
src/debug.py
patch
|
blob
|
history
src/environment.py
patch
|
blob
|
history
src/fork.py
patch
|
blob
|
history
src/loggingSimple.py
patch
|
blob
|
history
src/product.py
patch
|
blob
|
history
src/pyconf.py
patch
|
blob
|
history
src/returnCode.py
patch
|
blob
|
history
src/salomeTools.py
patch
|
blob
|
history
src/system.py
patch
|
blob
|
history
src/test/TOOLS.py
patch
|
blob
|
history
src/test_module.py
patch
|
blob
|
history
src/versionMinorMajorPatch.py
patch
|
blob
|
history
src/xmlManager.py
patch
|
blob
|
history
test/test_501_paramiko.py
patch
|
blob
|
history
test/test_sat5_0/log/test_launch_browser.py
patch
|
blob
|
history
test/test_sat5_0/prepare/test_prepare.py
patch
|
blob
|
history
diff --git
a/.gitignore
b/.gitignore
index 5d2f22756a213de02b6e8d7ea881b45479c8a400..de154bf7a09956a0a81c7171419e1e2d079b49d0 100644
(file)
--- a/
.gitignore
+++ b/
.gitignore
@@
-20,7
+20,4
@@
doc/src/commands/apidoc*
__pycache__/
# IDE/editors/tools cache files
__pycache__/
# IDE/editors/tools cache files
-.vscode/
-
-# cache file, generated by sat, to store configuration
-data/local.pyconf
+.vscode/
\ No newline at end of file
diff --git
a/AllTestLauncherSat.py
b/AllTestLauncherSat.py
index eaa1a967b5054a52b30297dfd3095c4ea38cc061..cf8319d96a0eebbc99c3801f22fe165dc404bf74 100755
(executable)
--- a/
AllTestLauncherSat.py
+++ b/
AllTestLauncherSat.py
@@
-86,7
+86,7
@@
def errPrint(aStr):
try:
import unittestpy.HTMLTestRunner as HTST
try:
import unittestpy.HTMLTestRunner as HTST
-except:
+except
Exception
:
HTST = None
errPrint("""
WARNING: no HTML output available.
HTST = None
errPrint("""
WARNING: no HTML output available.
@@
-96,7
+96,7
@@
WARNING: no HTML output available.
try:
import xmlrunner as XTST
try:
import xmlrunner as XTST
-except:
+except
Exception
:
XTST = None
errPrint("""
WARNING: no XML output available for unittest.
XTST = None
errPrint("""
WARNING: no XML output available for unittest.
diff --git
a/commands/application.py
b/commands/application.py
index 025baf3077a79443c5f4face376680e2bceaeb55..4015ff1c59b85d1ac67286dd0d964309138acc05 100644
(file)
--- a/
commands/application.py
+++ b/
commands/application.py
@@
-155,7
+155,7
@@
def customize_app(config, appli_dir, logger):
if text is not None:
try:
n.text = text.strip("\n\t").decode("UTF-8")
if text is not None:
try:
n.text = text.strip("\n\t").decode("UTF-8")
- except:
+ except
Exception
:
sys.stderr.write("################ %s %s\n" % (node_name, text))
n.text = "?"
parent.append(n)
sys.stderr.write("################ %s %s\n" % (node_name, text))
n.text = "?"
parent.append(n)
diff --git
a/commands/compile.py
b/commands/compile.py
index 0368549d190ccd9cae968da2f54b9d2a3aec09b2..12cfbe6acf8e26d137571e30fc7939051684bed9 100644
(file)
--- a/
commands/compile.py
+++ b/
commands/compile.py
@@
-230,7
+230,7
@@
def compile_all_products(sat, config, options, products_infos, all_products_dict
batch=True,
verbose=0,
logger_add_link = logger)
batch=True,
verbose=0,
logger_add_link = logger)
- except:
+ except
Exception
:
pass
if check_salome_configuration:
pass
if check_salome_configuration:
@@
-547,7
+547,7
@@
def compile_product_pip(sat,
env=build_environ.environ.environ,
stderr=subprocess.STDOUT).decode(sys.stdout.encoding).strip()
pip_build_options=int(res_pip_version.split('.')[0]) < 21
env=build_environ.environ.environ,
stderr=subprocess.STDOUT).decode(sys.stdout.encoding).strip()
pip_build_options=int(res_pip_version.split('.')[0]) < 21
- except:
+ except
Exception
:
pip_build_options= True
# d- install (in python or in separate product directory)
if src.appli_test_property(config,"pip_install_dir", "python"):
pip_build_options= True
# d- install (in python or in separate product directory)
if src.appli_test_property(config,"pip_install_dir", "python"):
diff --git
a/commands/config.py
b/commands/config.py
index 6bb522cf6ddfa44614f85c86b4622b75e12c9fae..24a95a86d28ce25f05a20f7e3d9ec7396ab7c425 100644
(file)
--- a/
commands/config.py
+++ b/
commands/config.py
@@
-22,7
+22,6
@@
import platform
import datetime
import shutil
import gettext
import datetime
import shutil
import gettext
-from pathlib import Path
import pprint as PP
import src
import pprint as PP
import src
@@
-287,15
+286,9
@@
class ConfigManager:
# Load LOCAL config file
# search only in the data directory
src.pyconf.streamOpener = ConfigOpener([cfg.VARS.datadir])
# Load LOCAL config file
# search only in the data directory
src.pyconf.streamOpener = ConfigOpener([cfg.VARS.datadir])
-
- # if `local.pyconf` file is missing, create it from
- # `local_original.pyconf` template file
- localconf_path = osJoin(cfg.VARS.datadir, 'local.pyconf')
- if not Path(localconf_path).is_file():
- shutil.copyfile(osJoin(cfg.VARS.datadir, 'local_original.pyconf'), localconf_path)
-
try:
try:
- local_cfg = src.pyconf.Config(open(localconf_path),
+ local_cfg = src.pyconf.Config(open( osJoin(cfg.VARS.datadir,
+ 'local.pyconf')),
PWD = ('LOCAL', cfg.VARS.datadir) )
except src.pyconf.ConfigError as e:
raise src.SatException(_("Error in configuration file: "
PWD = ('LOCAL', cfg.VARS.datadir) )
except src.pyconf.ConfigError as e:
raise src.SatException(_("Error in configuration file: "
@@
-1075,7
+1068,7
@@
def get_config_children(config, args):
if dir(a).__contains__('keys'):
vals = map(lambda x: head + '.' + x,
[m for m in a.keys() if m.startswith(tail)])
if dir(a).__contains__('keys'):
vals = map(lambda x: head + '.' + x,
[m for m in a.keys() if m.startswith(tail)])
- except:
+ except
Exception
:
pass
for v in sorted(vals):
pass
for v in sorted(vals):
diff --git
a/commands/generate.py
b/commands/generate.py
index fbd08aa5e57271f44df9b46c69f58eab60b02141..a6a83ce33d3185d0086bd28920313aa8280d84f4 100644
(file)
--- a/
commands/generate.py
+++ b/
commands/generate.py
@@
-147,7
+147,7
@@
def generate_component(config, compo, product_name, product_info, context, heade
# get files to build a template GUI
try: # try new yacsgen api
gui_files = salome_compo.getGUIfilesTemplate(compo)
# get files to build a template GUI
try: # try new yacsgen api
gui_files = salome_compo.getGUIfilesTemplate(compo)
- except: # use old yacsgen api
+ except
Exception
: # use old yacsgen api
gui_files = salome_compo.getGUIfilesTemplate()
else:
gui_files = None
gui_files = salome_compo.getGUIfilesTemplate()
else:
gui_files = None
diff --git
a/commands/jobs.py
b/commands/jobs.py
index c043d7048e094d8463f6f40b6f9f26b9a6c3c7dc..b948a74296c8a2743f0a2e07c5e8cfeb30f143f5 100644
(file)
--- a/
commands/jobs.py
+++ b/
commands/jobs.py
@@
-30,7
+30,7
@@
import re
# generate problem
try:
import paramiko
# generate problem
try:
import paramiko
-except:
+except
Exception
:
paramiko = "import paramiko impossible"
pass
paramiko = "import paramiko impossible"
pass
@@
-114,7
+114,7
@@
class Machine(object):
except paramiko.SSHException:
message = ( _("SSHException error connecting or "
"establishing an SSH session"))
except paramiko.SSHException:
message = ( _("SSHException error connecting or "
"establishing an SSH session"))
- except:
+ except
Exception
:
message = ( _("Error connecting or establishing an SSH session"))
else:
self._connection_successful = True
message = ( _("Error connecting or establishing an SSH session"))
else:
self._connection_successful = True
@@
-215,7
+215,7
@@
class Machine(object):
": the server failed to execute the command\n")
logger.write( src.printcolors.printcError(message))
return (None, None, None)
": the server failed to execute the command\n")
logger.write( src.printcolors.printcError(message))
return (None, None, None)
- except:
+ except
Exception
:
logger.write( src.printcolors.printcError(src.KO_STATUS + '\n'))
return (None, None, None)
else:
logger.write( src.printcolors.printcError(src.KO_STATUS + '\n'))
return (None, None, None)
else:
@@
-327,7
+327,7
@@
class Job(object):
'''
try:
pids = self.get_pids()
'''
try:
pids = self.get_pids()
- except:
+ except
Exception
:
return ("Unable to get the pid of the command.", "")
cmd_kill = " ; ".join([("kill -2 " + pid) for pid in pids])
return ("Unable to get the pid of the command.", "")
cmd_kill = " ; ".join([("kill -2 " + pid) for pid in pids])
diff --git
a/commands/log.py
b/commands/log.py
index 22a788570fc8fa85895c4ea82891a55e1b865ba6..fbdbaad8d5ca2d695b3b51bf9cd371fb3864d2ac 100644
(file)
--- a/
commands/log.py
+++ b/
commands/log.py
@@
-181,7
+181,7
@@
def ask_value(nb):
x = int(rep)
if x > nb:
x = -1
x = int(rep)
if x > nb:
x = -1
- except:
+ except
Exception
:
x = -1
return x
x = -1
return x
@@
-269,7
+269,7
@@
def run(args, runner, logger):
src.ensure_path_exists(os.path.join(logDir, "TEST"))
shutil.copy(xsltest, os.path.join(logDir, "TEST"))
shutil.copy(imgLogo, logDir)
src.ensure_path_exists(os.path.join(logDir, "TEST"))
shutil.copy(xsltest, os.path.join(logDir, "TEST"))
shutil.copy(imgLogo, logDir)
- except:
+ except
Exception
:
# we are here if an user make sat log in jenkins LOGS without write rights
# Make a warning and do nothing
logger.warning("problem for writing in directory '%s', may be not owner." % logDir)
# we are here if an user make sat log in jenkins LOGS without write rights
# Make a warning and do nothing
logger.warning("problem for writing in directory '%s', may be not owner." % logDir)
@@
-338,7
+338,7
@@
def run(args, runner, logger):
notShownCommands = notShownCommands)
logger.write(src.printcolors.printc("OK"), 3)
notShownCommands = notShownCommands)
logger.write(src.printcolors.printc("OK"), 3)
- except:
+ except
Exception
:
logger.write(src.printcolors.printc("KO"), 3)
logger.write(" problem update hat.xml", 3)
logger.write(src.printcolors.printc("KO"), 3)
logger.write(" problem update hat.xml", 3)
diff --git
a/commands/package.py
b/commands/package.py
index f91476e2d6b6b87c7027b2a4ba37431b0af6de62..c5ffbfffbd9fa811dc8d329639e9c3e858fd49df 100644
(file)
--- a/
commands/package.py
+++ b/
commands/package.py
@@
-385,7
+385,7
@@
def hack_for_distene_licence(filepath, licence_file):
import imp
distene = imp.load_source('distene_licence', distene_licence_file)
distene.set_distene_variables(context)
import imp
distene = imp.load_source('distene_licence', distene_licence_file)
distene.set_distene_variables(context)
- except:
+ except
Exception
:
pass\n""" % licence_file
text.insert(num_line + 1, text_to_insert)
for line in text:
pass\n""" % licence_file
text.insert(num_line + 1, text_to_insert)
for line in text:
@@
-948,7
+948,7
@@
def source_package(sat, config, logger, options, tmp_working_dir):
if not src.architecture.is_windows():
try:
t = os.getcwd()
if not src.architecture.is_windows():
try:
t = os.getcwd()
- except:
+ except
Exception
:
# In the jobs, os.getcwd() can fail
t = config.LOCAL.workdir
os.chdir(tmp_working_dir)
# In the jobs, os.getcwd() can fail
t = config.LOCAL.workdir
os.chdir(tmp_working_dir)
@@
-1447,7
+1447,7
@@
def project_package(config, name_project, project_file_path, ftp_mode, tmp_worki
try:
project_pyconf_cfg = config.PROJECTS.projects.__getattr__(name_project)
try:
project_pyconf_cfg = config.PROJECTS.projects.__getattr__(name_project)
- except:
+ except
Exception
:
logger.write("""
WARNING: inexisting config.PROJECTS.projects.%s, try to read now from:\n%s\n""" % (name_project, project_file_path))
project_pyconf_cfg = src.pyconf.Config(project_file_path)
logger.write("""
WARNING: inexisting config.PROJECTS.projects.%s, try to read now from:\n%s\n""" % (name_project, project_file_path))
project_pyconf_cfg = src.pyconf.Config(project_file_path)
@@
-1899,7
+1899,7
@@
Please add it in file:
# case if no application, only package sat as 'sat package -t'
try:
app = runner.cfg.APPLICATION
# case if no application, only package sat as 'sat package -t'
try:
app = runner.cfg.APPLICATION
- except:
+ except
Exception
:
app = None
# unconditionaly remove the tmp_local_working_dir
app = None
# unconditionaly remove the tmp_local_working_dir
diff --git
a/commands/template.py
b/commands/template.py
index e4ddc59677672ec65b8130cd0f57eff046c6248d..cdc1c8165e93d3991457027f88c58ea051c5500c 100644
(file)
--- a/
commands/template.py
+++ b/
commands/template.py
@@
-35,7
+35,7
@@
except NameError:
# Python 2/3 compatibility for execfile function
try:
execfile
# Python 2/3 compatibility for execfile function
try:
execfile
-except:
+except
Exception
:
def execfile(somefile, global_vars, local_vars):
with open(somefile) as f:
code = compile(f.read(), somefile, 'exec')
def execfile(somefile, global_vars, local_vars):
with open(somefile) as f:
code = compile(f.read(), somefile, 'exec')
diff --git
a/commands/test.py
b/commands/test.py
index 62fd7fef5cc6d55e793a4955b2dc6bde2f4ebc72..cac9b4c5227c3abfd8f99cf135eb33f184698409 100644
(file)
--- a/
commands/test.py
+++ b/
commands/test.py
@@
-174,7
+174,7
@@
def move_test_results(in_dir, what, out_dir, logger):
#shutil.rmtree(finalPath)
os.makedirs(finalPath)
pathIsOk = True
#shutil.rmtree(finalPath)
os.makedirs(finalPath)
pathIsOk = True
- except:
+ except
Exception
:
logger.error(_("%s cannot be created.") % finalPath)
finalPath = ask_a_path()
logger.error(_("%s cannot be created.") % finalPath)
finalPath = ask_a_path()
@@
-664,7
+664,7
@@
def run(args, runner, logger):
if os.access(tmp_dir, os.F_OK):
try:
shutil.rmtree(tmp_dir)
if os.access(tmp_dir, os.F_OK):
try:
shutil.rmtree(tmp_dir)
- except:
+ except
Exception
:
logger.error(_("error removing TT_TMP_RESULT %s\n")
% tmp_dir)
logger.error(_("error removing TT_TMP_RESULT %s\n")
% tmp_dir)
diff --git a/data/local.pyconf
b/data/local.pyconf
new file mode 100644
(file)
index 0000000..
eb81d5a
--- /dev/null
+++ b/
data/local.pyconf
@@ -0,0
+1,16
@@
+
+ LOCAL :
+ {
+ base : 'default'
+ workdir : 'default'
+ log_dir : 'default'
+ archive_dir : 'default'
+ VCS : 'unknown'
+ tag : 'unknown'
+ }
+ PROJECTS :
+ {
+ project_file_paths :
+ [
+ ]
+ }
diff --git
a/data/templates/Application/config/splash_generator/splash2.py
b/data/templates/Application/config/splash_generator/splash2.py
index 1521075b8d14de1e4e9c23ebb3eb1df0240426c8..8c9e3cdc91e9cb6f01bc306ab75e7667d3fabe5e 100755
(executable)
--- a/
data/templates/Application/config/splash_generator/splash2.py
+++ b/
data/templates/Application/config/splash_generator/splash2.py
@@
-9,7
+9,7
@@
import os, sys
try:
__LANG__ = os.environ["LANG"] # original locale
try:
__LANG__ = os.environ["LANG"] # original locale
-except:
+except
Exception
:
__LANG__ = "en_US.utf8" #default
__FR__={
__LANG__ = "en_US.utf8" #default
__FR__={
@@
-27,7
+27,7
@@
def _loc(text):
if "FR" in __LANG__:
try:
return __FR__[text]
if "FR" in __LANG__:
try:
return __FR__[text]
- except:
+ except
Exception
:
return text
return text
return text
return text
diff --git
a/data/templates/PythonComponent/src/PYCMP/PYCMP_utils.py
b/data/templates/PythonComponent/src/PYCMP/PYCMP_utils.py
index 56e155787b66ba1cd434368deb74a3edd722aa5f..da4f92b2a50df5d2b79a81703409d99c3af3a95d 100755
(executable)
--- a/
data/templates/PythonComponent/src/PYCMP/PYCMP_utils.py
+++ b/
data/templates/PythonComponent/src/PYCMP/PYCMP_utils.py
@@
-88,7
+88,7
@@
def verbose():
if __verbose__ is None:
try:
__verbose__ = int( os.getenv( 'SALOME_VERBOSE', 0 ) )
if __verbose__ is None:
try:
__verbose__ = int( os.getenv( 'SALOME_VERBOSE', 0 ) )
- except:
+ except
Exception
:
__verbose__ = 0
pass
pass
__verbose__ = 0
pass
pass
@@
-177,7
+177,7
@@
def findOrCreateComponent( study ):
try:
builder.DefineComponentInstance( father, getEngine() )
pass
try:
builder.DefineComponentInstance( father, getEngine() )
pass
- except:
+ except
Exception
:
pass
pass
return father
pass
pass
return father
diff --git
a/data/templates/PythonComponent8/src/PYCMP/PYCMP_utils.py
b/data/templates/PythonComponent8/src/PYCMP/PYCMP_utils.py
index 56e155787b66ba1cd434368deb74a3edd722aa5f..da4f92b2a50df5d2b79a81703409d99c3af3a95d 100755
(executable)
--- a/
data/templates/PythonComponent8/src/PYCMP/PYCMP_utils.py
+++ b/
data/templates/PythonComponent8/src/PYCMP/PYCMP_utils.py
@@
-88,7
+88,7
@@
def verbose():
if __verbose__ is None:
try:
__verbose__ = int( os.getenv( 'SALOME_VERBOSE', 0 ) )
if __verbose__ is None:
try:
__verbose__ = int( os.getenv( 'SALOME_VERBOSE', 0 ) )
- except:
+ except
Exception
:
__verbose__ = 0
pass
pass
__verbose__ = 0
pass
pass
@@
-177,7
+177,7
@@
def findOrCreateComponent( study ):
try:
builder.DefineComponentInstance( father, getEngine() )
pass
try:
builder.DefineComponentInstance( father, getEngine() )
pass
- except:
+ except
Exception
:
pass
pass
return father
pass
pass
return father
diff --git
a/src/ElementTree.py
b/src/ElementTree.py
index b871200f6461694aa6ff92d2fa83ab6bf8576130..65c63c9fe65f979be6b91a8d9121b460f22c14dd 100644
(file)
--- a/
src/ElementTree.py
+++ b/
src/ElementTree.py
@@
-30,7
+30,7
@@
else:
"""
try:
aStr = etree.tostring(node, encoding='unicode', method="pretty_xml")
"""
try:
aStr = etree.tostring(node, encoding='unicode', method="pretty_xml")
- except:
+ except
Exception
:
print("*****************************\n problem node", node)
# try no pretty
aStr = etree.tostring(node, encoding='unicode')
print("*****************************\n problem node", node)
# try no pretty
aStr = etree.tostring(node, encoding='unicode')
diff --git
a/src/ElementTreePython2.py
b/src/ElementTreePython2.py
index d1ba909381f358c50b07e5852dde728708176723..4b31874cd939a618ff8ec61060b1c02b1a674b9e 100644
(file)
--- a/
src/ElementTreePython2.py
+++ b/
src/ElementTreePython2.py
@@
-700,7
+700,7
@@
class ElementTree:
if items or xmlns_items:
try:
items = sorted(items) # lexical order
if items or xmlns_items:
try:
items = sorted(items) # lexical order
- except:
+ except
Exception
:
print("*** problem sorting items", items)
for k, v in items:
try:
print("*** problem sorting items", items)
for k, v in items:
try:
@@
-1086,7
+1086,7
@@
class TreeBuilder:
for item in self._data:
try:
text += item
for item in self._data:
try:
text += item
- except:
+ except
Exception
:
text += item.decode()
if self._tail:
assert self._last.tail is None, "internal error (tail)"
text += item.decode()
if self._tail:
assert self._last.tail is None, "internal error (tail)"
@@
-1292,7
+1292,7
@@
class XMLTreeBuilder:
"""
try:
self._parser.Parse(data, 0)
"""
try:
self._parser.Parse(data, 0)
- except:
+ except
Exception
:
print("*** problem feed:\n%s" % data.decode('utf-8'))
##
print("*** problem feed:\n%s" % data.decode('utf-8'))
##
diff --git
a/src/ElementTreePython3.py
b/src/ElementTreePython3.py
index 68635ce6d819df15a5a0f14af2f1164947dbab72..74adb5d9c0a6d275ebfcae96b02e16fb3e159acd 100644
(file)
--- a/
src/ElementTreePython3.py
+++ b/
src/ElementTreePython3.py
@@
-1266,7
+1266,7
@@
def iterparse(source, events=None, parser=None):
close_source = True
try:
return _IterParseIterator(source, events, parser, close_source)
close_source = True
try:
return _IterParseIterator(source, events, parser, close_source)
- except:
+ except
Exception
:
if close_source:
source.close()
raise
if close_source:
source.close()
raise
@@
-1365,7
+1365,7
@@
class _IterParseIterator:
else:
self._root = self._parser._close_and_return_root()
self.root = self._root
else:
self._root = self._parser._close_and_return_root()
self.root = self._root
- except:
+ except
Exception
:
if self._close_file:
self._file.close()
raise
if self._close_file:
self._file.close()
raise
diff --git
a/src/__init__.py
b/src/__init__.py
index 9f3e8d1e7a2fc26019dbee57d82f3ecee2954470..34aecded29620c8f1963250647320405a158703e 100644
(file)
--- a/
src/__init__.py
+++ b/
src/__init__.py
@@
-403,14
+403,14
@@
class Path:
try:
os.symlink(str(path), self.path)
return True
try:
os.symlink(str(path), self.path)
return True
- except:
+ except
Exception
:
return False
def copylink(self, path):
try:
os.symlink(os.readlink(self.path), str(path))
return True
return False
def copylink(self, path):
try:
os.symlink(os.readlink(self.path), str(path))
return True
- except:
+ except
Exception
:
return False
def copydir(self, dst, smart=False):
return False
def copydir(self, dst, smart=False):
@@
-429,14
+429,14
@@
class Path:
dstname = dst + name
srcname.copy(dstname, smart)
return True
dstname = dst + name
srcname.copy(dstname, smart)
return True
- except:
+ except
Exception
:
return False
def copyfile(self, path):
try:
shutil.copy2(self.path, str(path))
return True
return False
def copyfile(self, path):
try:
shutil.copy2(self.path, str(path))
return True
- except:
+ except
Exception
:
return False
def find_file_in_lpath(file_name, lpath, additional_dir = ""):
return False
def find_file_in_lpath(file_name, lpath, additional_dir = ""):
@@
-507,7
+507,7
@@
def find_file_in_ftppath(file_name, ftppath, installation_dir, logger, additiona
ftp.cwd(directory)
if additional_dir:
ftp.cwd(additional_dir)
ftp.cwd(directory)
if additional_dir:
ftp.cwd(additional_dir)
- except:
+ except
Exception
:
logger.error("while connecting to ftp server %s\n" % ftp_server)
continue
logger.error("while connecting to ftp server %s\n" % ftp_server)
continue
@@
-517,7
+517,7
@@
def find_file_in_ftppath(file_name, ftppath, installation_dir, logger, additiona
if ftp.size(file_name_md5) > 0:
with open(destination_md5,'wb') as dest_file_md5:
ftp.retrbinary("RETR "+file_name_md5, dest_file_md5.write)
if ftp.size(file_name_md5) > 0:
with open(destination_md5,'wb') as dest_file_md5:
ftp.retrbinary("RETR "+file_name_md5, dest_file_md5.write)
- except:
+ except
Exception
:
pass
try:
pass
try:
@@
-527,7
+527,7
@@
def find_file_in_ftppath(file_name, ftppath, installation_dir, logger, additiona
ftp.retrbinary("RETR "+file_name, dest_file.write)
logger.write(" Archive %s was retrieved and stored in %s\n" % (file_name, destination), 3)
return destination
ftp.retrbinary("RETR "+file_name, dest_file.write)
logger.write(" Archive %s was retrieved and stored in %s\n" % (file_name, destination), 3)
return destination
- except:
+ except
Exception
:
logger.error("File not found in ftp_archive %s\n" % ftp_server)
return False
logger.error("File not found in ftp_archive %s\n" % ftp_server)
return False
diff --git
a/src/architecture.py
b/src/architecture.py
index 6e83d0beeea8dcb950ea3f9cd0c98dba03cd7e8d..ad06c80e9ef6b819c62652dead451892a8f6498a 100644
(file)
--- a/
src/architecture.py
+++ b/
src/architecture.py
@@
-29,10
+29,10
@@
from platform import system,python_version,release
# write an error message if distro is not installed
try:
from platform import linux_distribution
# write an error message if distro is not installed
try:
from platform import linux_distribution
-except:
+except
Exception
:
try:
from distro import linux_distribution
try:
from distro import linux_distribution
- except:
+ except
Exception
:
print ("\nError :\n"
" linux_distribution was removed from platform module in Python 3.8+\n"
" For python 3.8+ sat requires distro module to get information on linux distribution.\n"
print ("\nError :\n"
" linux_distribution was removed from platform module in Python 3.8+\n"
" For python 3.8+ sat requires distro module to get information on linux distribution.\n"
@@
-59,7
+59,7
@@
def get_user():
else: # linux
import pwd
user_name=pwd.getpwuid(os.getuid())[0]
else: # linux
import pwd
user_name=pwd.getpwuid(os.getuid())[0]
- except :
+ except
Exception
:
user_name="Unknown"
return user_name
user_name="Unknown"
return user_name
@@
-160,7
+160,7
@@
def get_nb_proc():
try :
import multiprocessing
nb_proc=multiprocessing.cpu_count()
try :
import multiprocessing
nb_proc=multiprocessing.cpu_count()
- except :
+ except
Exception
:
if is_windows():
if os.environ.has_key("NUMBER_OF_PROCESSORS"):
nb_proc = int(os.environ["NUMBER_OF_PROCESSORS"])
if is_windows():
if os.environ.has_key("NUMBER_OF_PROCESSORS"):
nb_proc = int(os.environ["NUMBER_OF_PROCESSORS"])
diff --git
a/src/callerName.py
b/src/callerName.py
index 9fd0308f8088e21f9afb4a4ac65476a27e174db9..33df6ceb87387dd36523331eb53eda9fdbf1f7ff 100644
(file)
--- a/
src/callerName.py
+++ b/
src/callerName.py
@@
-116,7
+116,7
@@
def caller_name_stack(skip=1):
if namesrc == "__main__":
namesrc = os.path.basename(fr.f_globals["__file__"])
lineno.insert(0, (namesrc + "[%s]" % fr.f_lineno))
if namesrc == "__main__":
namesrc = os.path.basename(fr.f_globals["__file__"])
lineno.insert(0, (namesrc + "[%s]" % fr.f_lineno))
- except:
+ except
Exception
:
lineno.insert(0, ("??", fr.f_lineno))
if codename != '<module>': # top level usually
lineno.insert(0, ("??", fr.f_lineno))
if codename != '<module>': # top level usually
diff --git
a/src/compilation.py
b/src/compilation.py
index 751fe73b911891c94f4de45f3fa9d46768d169be..b8e84bdbbcf96e4fa94e2b2348f1e1cd5410b319 100644
(file)
--- a/
src/compilation.py
+++ b/
src/compilation.py
@@
-440,7
+440,7
@@
CC=\\"hack_libtool\\"%g" libtool'''
pymodule = imp.load_source(product + "_compile_script", script)
self.nb_proc = nb_proc
retcode = pymodule.compil(self.config, self, self.logger)
pymodule = imp.load_source(product + "_compile_script", script)
self.nb_proc = nb_proc
retcode = pymodule.compil(self.config, self, self.logger)
- except:
+ except
Exception
:
__, exceptionValue, exceptionTraceback = sys.exc_info()
self.logger.write(str(exceptionValue), 1)
import traceback
__, exceptionValue, exceptionTraceback = sys.exc_info()
self.logger.write(str(exceptionValue), 1)
import traceback
diff --git
a/src/debug.py
b/src/debug.py
index 330fb6df37c33468237c5c49f03f4e04528161b4..da1ca94ff7e0923a8c74e3abeb93204915d9e3d0 100755
(executable)
--- a/
src/debug.py
+++ b/
src/debug.py
@@
-61,7
+61,7
@@
import src
# Compatibility python 2/3 for unicode
try:
_test = unicode
# Compatibility python 2/3 for unicode
try:
_test = unicode
-except:
+except
Exception
:
unicode = str
# Compatibility python 2/3 for StringIO
unicode = str
# Compatibility python 2/3 for StringIO
@@
-272,7
+272,7
@@
def _saveConfigRecursiveDbg(config, aStream, indent, path, nb):
try: #type config, mapping
order = object.__getattribute__(config, 'order')
data = object.__getattribute__(config, 'data')
try: #type config, mapping
order = object.__getattribute__(config, 'order')
data = object.__getattribute__(config, 'data')
- except:
+ except
Exception
:
aStream.write("%s%s : '%s'\n" % (indstr, path, str(config)))
return
for key in sorted(data): #order): # data as sort alphabetical, order as initial order
aStream.write("%s%s : '%s'\n" % (indstr, path, str(config)))
return
for key in sorted(data): #order): # data as sort alphabetical, order as initial order
diff --git
a/src/environment.py
b/src/environment.py
index a706d5deab31149f876575522860b92198d41b46..74e6bbdd2106f6ede15163a074b1889472e37e29 100644
(file)
--- a/
src/environment.py
+++ b/
src/environment.py
@@
-321,7
+321,7
@@
class SalomeEnviron:
for k in self.environ.environ.keys():
try:
value = self.get(k)
for k in self.environ.environ.keys():
try:
value = self.get(k)
- except:
+ except
Exception
:
value = "?"
out.write("%s=%s\n" % (k, value))
value = "?"
out.write("%s=%s\n" % (k, value))
@@
-743,7
+743,7
@@
class SalomeEnviron:
# not mandatory, if set_nativ_env not defined, we do nothing
if "set_nativ_env" in dir(pyproduct):
pyproduct.set_nativ_env(self)
# not mandatory, if set_nativ_env not defined, we do nothing
if "set_nativ_env" in dir(pyproduct):
pyproduct.set_nativ_env(self)
- except:
+ except
Exception
:
__, exceptionValue, exceptionTraceback = sys.exc_info()
print(exceptionValue)
import traceback
__, exceptionValue, exceptionTraceback = sys.exc_info()
print(exceptionValue)
import traceback
diff --git
a/src/fork.py
b/src/fork.py
index aa239de9a05581797fa8d08ea04959a210e59e7f..e4492f04cdb1b5edf5a7f36591f69a2608313e84 100644
(file)
--- a/
src/fork.py
+++ b/
src/fork.py
@@
-131,7
+131,7
@@
def batch_salome(cmd, logger, cwd, args, getTmpDir,
try:
statinfo = os.stat(os.path.join(tmp_dir, file_name))
currentTime = statinfo.st_mtime
try:
statinfo = os.stat(os.path.join(tmp_dir, file_name))
currentTime = statinfo.st_mtime
- except:
+ except
Exception
:
pass
if currentTime and currentTime > beginTime:
pass
if currentTime and currentTime > beginTime:
diff --git
a/src/loggingSimple.py
b/src/loggingSimple.py
index 177b3426f2bf67dea058be8d2933518fc663c6dd..ddbb0b78ba6a67b343760edb59dea979ead905bd 100755
(executable)
--- a/
src/loggingSimple.py
+++ b/
src/loggingSimple.py
@@
-377,7
+377,7
@@
class StreamHandlerSimple(LOGI.StreamHandler, object): # object force new-style
self.flush()
except (KeyboardInterrupt, SystemExit):
raise
self.flush()
except (KeyboardInterrupt, SystemExit):
raise
- except:
+ except
Exception
:
self.handleError(record)
self.handleError(record)
diff --git
a/src/product.py
b/src/product.py
index a679e44817d9d767140fbeb15f83076b0ed1fe5c..091ffe2d188093c0d42f493291ff5f2fd8395e7d 100644
(file)
--- a/
src/product.py
+++ b/
src/product.py
@@
-355,7
+355,7
@@
Please provide a 'compil_script' key in its definition.""") % product_name
"prod_name" : prod_info.name})
raise src.SatException(msg)
patches.append(patch_path)
"prod_name" : prod_info.name})
raise src.SatException(msg)
patches.append(patch_path)
- except:
+ except
Exception
:
DBG.tofix("problem in prod_info.patches", prod_info)
prod_info.patches = patches
DBG.tofix("problem in prod_info.patches", prod_info)
prod_info.patches = patches
@@
-425,7
+425,7
@@
def get_product_section(config, product_name, version, section=None):
# decode version number
try:
versionMMP = VMMP.MinorMajorPatch(version)
# decode version number
try:
versionMMP = VMMP.MinorMajorPatch(version)
- except: # example setuptools raise "minor in major_minor_patch is not integer: '0_6c11'"
+ except
Exception
: # example setuptools raise "minor in major_minor_patch is not integer: '0_6c11'"
versionMMP = None
# if a section is explicitely specified we select it
versionMMP = None
# if a section is explicitely specified we select it
@@
-666,7
+666,7
@@
def add_compile_config_file(p_info, config):
try:
with open(aFile, 'w') as f:
p_info.__save__(f, evaluated=True) # evaluated expressions mode
try:
with open(aFile, 'w') as f:
p_info.__save__(f, evaluated=True) # evaluated expressions mode
- except:
+ except
Exception
:
# sometime some information cannot be evaluated.
# for example, in the context of non VCS archives, information on git server is not available.
DBG.write("Warning : sat was not able to evaluate and write down some information in file %s" % aFile)
# sometime some information cannot be evaluated.
# for example, in the context of non VCS archives, information on git server is not available.
DBG.write("Warning : sat was not able to evaluate and write down some information in file %s" % aFile)
@@
-829,7
+829,7
@@
def get_products_list(options, cfg, logger):
else:
res.append((p_name, p_info))
ok.append(p_name)
else:
res.append((p_name, p_info))
ok.append(p_name)
- except:
+ except
Exception
:
res.append((p_name, p_info))
ok.append(p_name)
else:
res.append((p_name, p_info))
ok.append(p_name)
else:
@@
-840,7
+840,7
@@
def get_products_list(options, cfg, logger):
ok.append(p_name)
else:
ko.append(p_name)
ok.append(p_name)
else:
ko.append(p_name)
- except:
+ except
Exception
:
ko.append(p_name)
if len(ok) != len(resAll):
ko.append(p_name)
if len(ok) != len(resAll):
diff --git
a/src/pyconf.py
b/src/pyconf.py
index 5957d6ddcf8a12cbe2d5d971bf3eac266ca50ada..d19b5776c421d7c92ef1828598c1816e195f7e5e 100644
(file)
--- a/
src/pyconf.py
+++ b/
src/pyconf.py
@@
-155,7
+155,7
@@
else:
try:
has_utf32 = True
try:
has_utf32 = True
-except:
+except
Exception
:
has_utf32 = False
class ConfigInputStream(object):
has_utf32 = False
class ConfigInputStream(object):
@@
-951,7
+951,7
@@
class Reference(object):
rv = eval(str(self)[1:-1], vars(ns))
found = True
break
rv = eval(str(self)[1:-1], vars(ns))
found = True
break
- except:
+ except
Exception
:
pass
if found:
break
pass
if found:
break
@@
-963,7
+963,7
@@
class Reference(object):
key = item[1]
rv = rv[key]
break
key = item[1]
rv = rv[key]
break
- except:
+ except
Exception
:
rv = None
pass
current = object.__getattribute__(current, 'parent')
rv = None
pass
current = object.__getattribute__(current, 'parent')
@@
-1632,13
+1632,13
@@
class ConfigMerger(object):
continue
try:
exec( 'map1.' + key + " = " + repr(overwrite_instruction[key]))
continue
try:
exec( 'map1.' + key + " = " + repr(overwrite_instruction[key]))
- except:
+ except
Exception
:
exec('map1.' + key + " = " + str(overwrite_instruction[key]))
else:
for key in overwrite_instruction.keys():
try:
exec('map1.' + key + " = " + repr(overwrite_instruction[key]))
exec('map1.' + key + " = " + str(overwrite_instruction[key]))
else:
for key in overwrite_instruction.keys():
try:
exec('map1.' + key + " = " + repr(overwrite_instruction[key]))
- except:
+ except
Exception
:
exec('map1.' + key + " = " + str(overwrite_instruction[key]))
def mergeMapping(self, map1, map2):
exec('map1.' + key + " = " + str(overwrite_instruction[key]))
def mergeMapping(self, map1, map2):
diff --git
a/src/returnCode.py
b/src/returnCode.py
index 1af9116677d72a9969a3b197376751e66d925140..240eb6332ce797a73404b5dfa011da95225723d5 100644
(file)
--- a/
src/returnCode.py
+++ b/
src/returnCode.py
@@
-148,7
+148,7
@@
class ReturnCode(object):
"""return system return code as bash or bat"""
try:
return self._TOSYS[self._status]
"""return system return code as bash or bat"""
try:
return self._TOSYS[self._status]
- except:
+ except
Exception
:
return self._TOSYS[self.NA_STATUS]
def toXmlPassed(self):
return self._TOSYS[self.NA_STATUS]
def toXmlPassed(self):
diff --git
a/src/salomeTools.py
b/src/salomeTools.py
index a49524b24c465199efc051015dc06bed564dd2f7..2b1a50d442a1b9c3706346f7dbd0fbeb517f0d97 100755
(executable)
--- a/
src/salomeTools.py
+++ b/
src/salomeTools.py
@@
-67,7
+67,7
@@
gettext.install("salomeTools", os.path.join(srcdir, "i18n"))
try:
_LANG = os.environ["LANG"] # original locale
try:
_LANG = os.environ["LANG"] # original locale
-except:
+except
Exception
:
_LANG = "en_US.utf8" #default
# The possible hooks :
_LANG = "en_US.utf8" #default
# The possible hooks :
@@
-356,7
+356,7
@@
class Sat(object):
sys.stderr = ff
import paramiko
sys.stderr = saveout
sys.stderr = ff
import paramiko
sys.stderr = saveout
- except:
+ except
Exception
:
sys.stderr = saveout
continue
sys.stderr = saveout
continue
diff --git
a/src/system.py
b/src/system.py
index acb6feaef88bb8002125fb989b86899c77f38aad..cc500d0f5862ff3886a20e65309c9ef57687125a 100644
(file)
--- a/
src/system.py
+++ b/
src/system.py
@@
-53,7
+53,7
@@
def show_in_editor(editor, filePath, logger):
logger.write('Launched command:\n' + cmd + '\n', 5)
p = SP.Popen(cmd, shell=True)
p.communicate()
logger.write('Launched command:\n' + cmd + '\n', 5)
p = SP.Popen(cmd, shell=True)
p.communicate()
- except:
+ except
Exception
:
logger.write(printcolors.printcError(_("Unable to edit file %s\n")
% filePath), 1)
logger.write(printcolors.printcError(_("Unable to edit file %s\n")
% filePath), 1)
@@
-444,7
+444,7
@@
def check_system_pkg(check_cmd,pkg):
try:
output = SP.check_output(['grep', pkg], stdin=p.stdout)
msg_status=src.printcolors.printcSuccess("OK")
try:
output = SP.check_output(['grep', pkg], stdin=p.stdout)
msg_status=src.printcolors.printcSuccess("OK")
- except:
+ except
Exception
:
msg_status=src.printcolors.printcError("KO")
msg_status+=" (package is not installed!)\n"
elif check_cmd[0] == "dpkg-query":
msg_status=src.printcolors.printcError("KO")
msg_status+=" (package is not installed!)\n"
elif check_cmd[0] == "dpkg-query":
diff --git
a/src/test/TOOLS.py
b/src/test/TOOLS.py
index 64b4b11c402da21c7c019b13298be6e803190e1c..7e2b9e104cac8fa06d8ec3ededc87a88dd4f2f8d 100644
(file)
--- a/
src/test/TOOLS.py
+++ b/
src/test/TOOLS.py
@@
-90,7
+90,7
@@
def compMED(file1, file2, tol=0, diff_flags=""):
try:
line.index('Universal name of mesh')
continue
try:
line.index('Universal name of mesh')
continue
- except:
+ except
Exception
:
dumpfile.write(line.replace(med, 'filename'))
return dump
dumpfile.write(line.replace(med, 'filename'))
return dump
diff --git
a/src/test_module.py
b/src/test_module.py
index 03c7b5810943500cefa86a2b459fed78860e2f35..218ba182e1073ff4afb26afbefe335ae6da7fc34 100644
(file)
--- a/
src/test_module.py
+++ b/
src/test_module.py
@@
-19,7
+19,7
@@
# Python 2/3 compatibility for execfile function
try:
execfile
# Python 2/3 compatibility for execfile function
try:
execfile
-except:
+except
Exception
:
def execfile(somefile, global_vars, local_vars):
with open(somefile) as f:
code = compile(f.read(), somefile, 'exec')
def execfile(somefile, global_vars, local_vars):
with open(somefile) as f:
code = compile(f.read(), somefile, 'exec')
@@
-354,12
+354,12
@@
class Test:
if 'time' in ldic:
try:
exec_time = float(ldic['time'])
if 'time' in ldic:
try:
exec_time = float(ldic['time'])
- except:
+ except
Exception
:
pass
results[test] = [status, exec_time, callback, expected]
pass
results[test] = [status, exec_time, callback, expected]
- except:
+ except
Exception
:
results[test] = ["?", -1, "", []]
# results[test] = [src.O_STATUS, -1, open(resfile, 'r').read(), []]
results[test] = ["?", -1, "", []]
# results[test] = [src.O_STATUS, -1, open(resfile, 'r').read(), []]
@@
-484,7
+484,7
@@
echo -e 'import os\nprint(os.environ[\"KERNEL_ROOT_DIR\"])' > tmpscript.py
try:
grid = imp.load_module(sal_uts, file_, pathname, description)
return grid.getLogDir
try:
grid = imp.load_module(sal_uts, file_, pathname, description)
return grid.getLogDir
- except:
+ except
Exception
:
grid = imp.load_module(sal_uts, file_, pathname, description)
return grid.getTmpDir
finally:
grid = imp.load_module(sal_uts, file_, pathname, description)
return grid.getTmpDir
finally:
diff --git
a/src/versionMinorMajorPatch.py
b/src/versionMinorMajorPatch.py
index a8df9545c1f84dd954fb3da96b5b89660b9daed9..e7d87319c4eacbc2cb096ad10a1632fa5ae32131 100755
(executable)
--- a/
src/versionMinorMajorPatch.py
+++ b/
src/versionMinorMajorPatch.py
@@
-90,7
+90,7
@@
def toList_majorMinorPatch(aStr, verbose=False):
try:
ii = int(res[0])
try:
ii = int(res[0])
- except:
+ except
Exception
:
msg = "major in major_minor_patch is not integer: '%s'" % aStr
raise Exception(msg)
if ii < 0:
msg = "major in major_minor_patch is not integer: '%s'" % aStr
raise Exception(msg)
if ii < 0:
@@
-99,7
+99,7
@@
def toList_majorMinorPatch(aStr, verbose=False):
try:
ii = int(res[1])
try:
ii = int(res[1])
- except:
+ except
Exception
:
msg = "minor in major_minor_patch is not integer: '%s'" % aStr
raise Exception(msg)
if ii < 0:
msg = "minor in major_minor_patch is not integer: '%s'" % aStr
raise Exception(msg)
if ii < 0:
@@
-108,7
+108,7
@@
def toList_majorMinorPatch(aStr, verbose=False):
try:
ii = int(res[2])
try:
ii = int(res[2])
- except:
+ except
Exception
:
msg = "patch in major_minor_patch is not integer: '%s'" % aStr
raise Exception(msg)
if ii < 0:
msg = "patch in major_minor_patch is not integer: '%s'" % aStr
raise Exception(msg)
if ii < 0:
@@
-186,7
+186,7
@@
def getRange_majorMinorPatch(aStr, verbose=False):
try:
rMin = MinorMajorPatch(aMin)
rMax = MinorMajorPatch(aMax)
try:
rMin = MinorMajorPatch(aMin)
rMax = MinorMajorPatch(aMax)
- except:
+ except
Exception
:
msg = "problem version range in '%s'" % aStr
raise Exception(msg)
"""if verbose:
msg = "problem version range in '%s'" % aStr
raise Exception(msg)
"""if verbose:
diff --git
a/src/xmlManager.py
b/src/xmlManager.py
index 6a4bb660eebf4ec231cedc40f0b753724116654a..8f7f28e250aa8839ff43ff5e5ffd16f1a8d64e29 100644
(file)
--- a/
src/xmlManager.py
+++ b/
src/xmlManager.py
@@
-23,7
+23,7
@@
try: # For python2
import sys
reload(sys)
sys.setdefaultencoding('utf8')
import sys
reload(sys)
sys.setdefaultencoding('utf8')
-except:
+except
Exception
:
pass
import src
pass
import src
diff --git
a/test/test_501_paramiko.py
b/test/test_501_paramiko.py
index ab5f92ba9d935662f267541714102715ecfbca48..3b0c7fb0d4639ddd3e9f07fe5751a50529b7c73e 100755
(executable)
--- a/
test/test_501_paramiko.py
+++ b/
test/test_501_paramiko.py
@@
-161,7
+161,7
@@
class TestCase(unittest.TestCase):
try:
import paramiko as PK
try:
import paramiko as PK
- except:
+ except
Exception
:
print("\nproblem 'import paramiko', no tests")
return
print("\nproblem 'import paramiko', no tests")
return
diff --git
a/test/test_sat5_0/log/test_launch_browser.py
b/test/test_sat5_0/log/test_launch_browser.py
index a9c8be45cd5790f2615bc1d3f9bd2af05abbfd63..c06bddf3954b03c191555fe8c5ec854e5583c913 100755
(executable)
--- a/
test/test_sat5_0/log/test_launch_browser.py
+++ b/
test/test_sat5_0/log/test_launch_browser.py
@@
-64,7
+64,7
@@
class TestCase(unittest.TestCase):
sat.log('-t')
OK = "OK"
sys.stdin = sys.__stdin__
sat.log('-t')
OK = "OK"
sys.stdin = sys.__stdin__
- except:
+ except
Exception
:
sys.stdin = sys.__stdin__
self.assertEqual(OK, "OK")
sys.stdin = sys.__stdin__
self.assertEqual(OK, "OK")
@@
-84,7
+84,7
@@
class TestCase(unittest.TestCase):
sat.log('appli-test -t --last')
OK = "OK"
sys.stdin = sys.__stdin__
sat.log('appli-test -t --last')
OK = "OK"
sys.stdin = sys.__stdin__
- except:
+ except
Exception
:
pass
self.assertEqual(OK, "OK")
pass
self.assertEqual(OK, "OK")
diff --git
a/test/test_sat5_0/prepare/test_prepare.py
b/test/test_sat5_0/prepare/test_prepare.py
index 334054772909d6c934b4013c23abcdbc871cb46c..d6779a8c3ac29ccf2201e96da2ccbd43bff9b105 100755
(executable)
--- a/
test/test_sat5_0/prepare/test_prepare.py
+++ b/
test/test_sat5_0/prepare/test_prepare.py
@@
-91,7
+91,7
@@
class TestCase(unittest.TestCase):
try:
sat.prepare(appli + " --force --force_patch")
OK = 'OK'
try:
sat.prepare(appli + " --force --force_patch")
OK = 'OK'
- except:
+ except
Exception
:
pass
self.assertEqual(OK, 'OK')
pass
self.assertEqual(OK, 'OK')