# return in sorted_nodes the list of sorted nodes
def depth_first_topo_graph(graph, start, visited=[], sorted_nodes=[]):
visited = visited + [start]
+ if start not in graph:
+ raise src.SatException('Error in product dependencies : %s product is referenced in products dependencies but is not present in the application !' % start)
for node in graph[start]:
if node not in visited:
visited,sorted_nodes=depth_first_topo_graph(graph, node, visited,sorted_nodes)
else:
- assert node in sorted_nodes, 'Error : cycle detection for node %s and %s !' % (start,node)
+ if node not in sorted_nodes:
+ raise src.SatException('Error in product dependencies : cycle detection for node %s and %s !' % (start,node))
sorted_nodes = sorted_nodes + [start]
return visited,sorted_nodes
# no Exception but may be known problem
DBG.write("execute_cli return code", returnCode)
- if returnCode.isOk():
- # OK no trace
- logger.step("sat exit code: %s" % returnCode)
- else:
- # KO warning as known problem have to say why
- logger.warning("sat exit code: %s" % returnCode)
+ logger.step("sat exit code: %s" % returnCode)
logger.close() # important to close logger
sys.exit(returnCode.toSys())
msgstr "affiche l'aide générale ou pour une commande spécifique."
msgid "overwrites a configuration parameters."
-msgstr "écrase un parametre de configuration."
+msgstr "modifie un parametre de configuration."
msgid "run salomeTools in debug mode."
msgstr "lance salomeTools en mode debug."
if res is None:
res = 0
+ except src.SatException as e:
+ # for sat exception do not display the stack, unless debug mode is set
+ logger_command.write("\n***** ", 1)
+ logger_command.write(src.printcolors.printcError(
+ "salomeTools ERROR: sat %s" % __nameCmd__), 1)
+ logger_command.write(" *****\n", 1)
+ print(e.message)
+ if self.options.debug_mode:
+ logger_command.write("\n" + DBG.format_exception("") + "\n", 1)
+
except Exception as e:
- # Get error
+ # here we print the stack in addition
logger_command.write("\n***** ", 1)
logger_command.write(src.printcolors.printcError(
"salomeTools ERROR: sat %s" % __nameCmd__), 1)