comptes_inactifs: no more eval
This commit is contained in:
parent
7af634e95d
commit
dcff017736
1 changed files with 2 additions and 2 deletions
|
@ -308,7 +308,7 @@ comptes_inactifs.py
|
||||||
def usage():
|
def usage():
|
||||||
""" Afficher l'aide. """
|
""" Afficher l'aide. """
|
||||||
prog = sys.argv[0]
|
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]
|
for x in actions]
|
||||||
acts = '\n'.join(acts)
|
acts = '\n'.join(acts)
|
||||||
print __doc__ % locals()
|
print __doc__ % locals()
|
||||||
|
@ -329,4 +329,4 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
ci = ComptesInactifs()
|
ci = ComptesInactifs()
|
||||||
for commande in args:
|
for commande in args:
|
||||||
eval('ci.do_%s()' % commande)
|
getattr(ci, 'do_' + commande)()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue