Commit dcff0177 authored by Daniel STAN's avatar Daniel STAN

comptes_inactifs: no more eval

parent 7af634e9
......@@ -308,7 +308,7 @@ comptes_inactifs.py
def usage():
""" Afficher l'aide. """
prog = sys.argv[0]
acts = [x + '\n' + '\n'.join(eval("ComptesInactifs.do_%s.__doc__" % x).split('\n')[1:-1])
acts = [x + '\n' + '\n'.join(getattr(ComptesInactifs, 'do_' + x).__doc__.split('\n')[1:-1])
for x in actions]
acts = '\n'.join(acts)
print __doc__ % locals()
......@@ -329,4 +329,4 @@ if __name__ == '__main__':
ci = ComptesInactifs()
for commande in args:
eval('ci.do_%s()' % commande)
getattr(ci, 'do_' + commande)()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment