return (None, 1)
if myaction in unmerge_actions and \
not sets[s].supportsOperation("unmerge"):
- sys.stderr.write("emerge: the given set '%s' does " % s + \
- "not support unmerge operations\n")
+ writemsg_level("emerge: the given set '%s' does " % s + \
+ "not support unmerge operations\n",
+ level=logging.ERROR, noiselevel=-1)
retval = 1
elif not set_atoms:
- print("emerge: '%s' is an empty set" % s)
+ writemsg_level("emerge: '%s' is an empty set\n" % s,
+ level=logging.INFO, noiselevel=-1)
else:
newargs.extend(set_atoms)
- for e in sets[s].errors:
- print(e)
+ for error_msg in sets[s].errors:
+ writemsg_level("%s\n" % (error_msg,),
+ level=logging.ERROR, noiselevel=-1)
else:
newargs.append(a)
return (newargs, retval)
noiselevel=-1)
for pset in list(depgraph_sets.sets.values()) + [sets[s]]:
for error_msg in pset.errors:
- sys.stderr.write("%s\n" % (error_msg,))
+ writemsg_level("%s\n" % (error_msg,),
+ level=logging.ERROR, noiselevel=-1)
writemsg_level(("emerge: the given set '%s' "
"contains a non-existent set named '%s'.\n") % \
for depgraph_sets in self._dynamic_config.sets.values():
for pset in depgraph_sets.sets.values():
- for e in pset.errors:
- sys.stderr.write("%s\n" % (e,))
+ for error_msg in pset.errors:
+ writemsg_level("%s\n" % (error_msg,),
+ level=logging.ERROR, noiselevel=-1)
# TODO: Add generic support for "set problem" handlers so that
# the below warnings aren't special cases for world only.