From: Robert Lehmann Date: Fri, 26 Nov 2010 08:46:52 +0000 (+0100) Subject: Use a clean getattr() instead of eval(). X-Git-Tag: 1.1.0~245^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3803b501a79071187324d75efdf1ea9e3437347f;p=be.git Use a clean getattr() instead of eval(). --- diff --git a/libbe/command/list.py b/libbe/command/list.py index 06249a0..f348d5c 100644 --- a/libbe/command/list.py +++ b/libbe/command/list.py @@ -156,7 +156,7 @@ class List (libbe.command.Command): raise libbe.command.UserError( 'Invalid sort on "%s".\nValid sorts:\n %s' % (cmp, '\n '.join(AVAILABLE_CMPS))) - cmp_list.append(eval('libbe.bug.cmp_%s' % cmp)) + cmp_list.append(getattr(libbe.bug, 'cmp_%s' % cmp)) status = parse_status(params['status']) severity = parse_severity(params['severity'], important=params['important'])