Index: management/univention-management-console-module-ucr/umc/python/ucr/__init__.py =================================================================== --- management/univention-management-console-module-ucr/umc/python/ucr/__init__.py (Revision 11112) +++ management/univention-management-console-module-ucr/umc/python/ucr/__init__.py (Arbeitskopie) @@ -198,7 +198,7 @@ def _match_all(name, var): return _match_value(name, var) or _match_description(name, var) or _match_key(name, var) - func = eval('_match_%s' % key) + func = locals().get('_match_%s' % key) for name, var in base_info.get_variables(category).iteritems(): if func(name, var): variables.append({'key': name, Index: management/univention-management-console-module-udm/umc/python/udm/__init__.py =================================================================== --- management/univention-management-console-module-udm/umc/python/udm/__init__.py (Revision 11112) +++ management/univention-management-console-module-udm/umc/python/udm/__init__.py (Arbeitskopie) @@ -188,7 +188,7 @@ for item in ( 'licenses', 'real' ): license_data[ item ] = {} for lic_type in ( 'CLIENT', 'ACCOUNT', 'DESKTOP', 'GROUPWARE' ): - count = getattr( udm_license._license, item )[udm_license._license.version][ eval( 'udm_license.License.%s' % lic_type ) ] + count = getattr( udm_license._license, item )[udm_license._license.version][ getattr(udm_license.License, lic_type) ] if isinstance( count, basestring ): try: count = int( count ) @@ -202,7 +202,7 @@ for item in ( 'licenses', 'real' ): license_data[ item ] = {} for lic_type in ( 'SERVERS', 'USERS', 'MANAGEDCLIENTS', 'CORPORATECLIENTS', 'VIRTUALDESKTOPUSERS', 'VIRTUALDESKTOPCLIENTS' ): - count = getattr( udm_license._license, item )[udm_license._license.version][ eval( 'udm_license.License.%s' % lic_type ) ] + count = getattr( udm_license._license, item )[udm_license._license.version][ getattr(udm_license.License, lic_type) ] if isinstance( count, basestring ): try: count = int( count ) Index: services/univention-pkgdb/umc/python/pkgdb/__init__.py =================================================================== --- services/univention-pkgdb/umc/python/pkgdb/__init__.py (Revision 11112) +++ services/univention-pkgdb/umc/python/pkgdb/__init__.py (Arbeitskopie) @@ -330,9 +330,9 @@ # our own instance that has the name of the query name (with '_opt_' prepended), # and that method is supposed to accept the options and to return changed options. options = request.options - optfunc = '_opt_' + options.get('key','') + optfunc = getattr(self, '_opt_%s' % (options.get('key', '')), None) try: - options = eval('self.%s(options=options)' % optfunc) + options = optfunc(options=options) # -------------- DEBUG ---------------- MODULE.info(" ++ changed options:") @@ -519,7 +519,7 @@ # starts with underscore? try to call it as a method of 'self' if isinstance(result, str) and result.startswith('_'): try: - r = eval('self.%s()' % result) + r = getattr(self, result)() result = r finally: pass