View | Details | Raw Unified | Return to bug 31523
Collapse All | Expand All

(-)management/univention-management-console-module-ucr/umc/python/ucr/__init__.py (-1 / +1 lines)
 Lines 198-204    Link Here 
198
		def _match_all(name, var):
198
		def _match_all(name, var):
199
			return _match_value(name, var) or _match_description(name, var) or _match_key(name, var)
199
			return _match_value(name, var) or _match_description(name, var) or _match_key(name, var)
200
200
201
		func = eval('_match_%s' % key)
201
		func = locals().get('_match_%s' % key)
202
		for name, var in base_info.get_variables(category).iteritems():
202
		for name, var in base_info.get_variables(category).iteritems():
203
			if func(name, var):
203
			if func(name, var):
204
				variables.append({'key': name,
204
				variables.append({'key': name,
(-)management/univention-management-console-module-udm/umc/python/udm/__init__.py (-2 / +2 lines)
 Lines 188-194    Link Here 
188
				for item in ( 'licenses', 'real' ):
188
				for item in ( 'licenses', 'real' ):
189
					license_data[ item ] = {}
189
					license_data[ item ] = {}
190
					for lic_type in ( 'CLIENT', 'ACCOUNT', 'DESKTOP', 'GROUPWARE' ):
190
					for lic_type in ( 'CLIENT', 'ACCOUNT', 'DESKTOP', 'GROUPWARE' ):
191
						count = getattr( udm_license._license, item )[udm_license._license.version][ eval( 'udm_license.License.%s' % lic_type ) ]
191
						count = getattr( udm_license._license, item )[udm_license._license.version][ getattr(udm_license.License, lic_type) ]
192
						if isinstance( count, basestring ):
192
						if isinstance( count, basestring ):
193
							try:
193
							try:
194
								count = int( count )
194
								count = int( count )
 Lines 202-208    Link Here 
202
				for item in ( 'licenses', 'real' ):
202
				for item in ( 'licenses', 'real' ):
203
					license_data[ item ] = {}
203
					license_data[ item ] = {}
204
					for lic_type in ( 'SERVERS', 'USERS', 'MANAGEDCLIENTS', 'CORPORATECLIENTS', 'VIRTUALDESKTOPUSERS', 'VIRTUALDESKTOPCLIENTS' ):
204
					for lic_type in ( 'SERVERS', 'USERS', 'MANAGEDCLIENTS', 'CORPORATECLIENTS', 'VIRTUALDESKTOPUSERS', 'VIRTUALDESKTOPCLIENTS' ):
205
						count = getattr( udm_license._license, item )[udm_license._license.version][ eval( 'udm_license.License.%s' % lic_type ) ]
205
						count = getattr( udm_license._license, item )[udm_license._license.version][ getattr(udm_license.License, lic_type) ]
206
						if isinstance( count, basestring ):
206
						if isinstance( count, basestring ):
207
							try:
207
							try:
208
								count = int( count )
208
								count = int( count )
(-)services/univention-pkgdb/umc/python/pkgdb/__init__.py (-3 / +3 lines)
 Lines 330-338    Link Here 
330
		# our own instance that has the name of the query name (with '_opt_' prepended),
330
		# our own instance that has the name of the query name (with '_opt_' prepended),
331
		# and that method is supposed to accept the options and to return changed options.
331
		# and that method is supposed to accept the options and to return changed options.
332
		options = request.options
332
		options = request.options
333
		optfunc = '_opt_' + options.get('key','')
333
		optfunc = getattr(self, '_opt_%s' % (options.get('key', '')), None)
334
		try:
334
		try:
335
			options = eval('self.%s(options=options)' % optfunc)
335
			options = optfunc(options=options)
336
336
337
			# -------------- DEBUG ----------------
337
			# -------------- DEBUG ----------------
338
			MODULE.info("   ++ changed options:")
338
			MODULE.info("   ++ changed options:")
 Lines 519-525    Link Here 
519
			# starts with underscore? try to call it as a method of 'self'
519
			# starts with underscore? try to call it as a method of 'self'
520
			if isinstance(result, str) and result.startswith('_'):
520
			if isinstance(result, str) and result.startswith('_'):
521
				try:
521
				try:
522
					r = eval('self.%s()' % result)
522
					r = getattr(self, result)()
523
					result = r
523
					result = r
524
				finally:
524
				finally:
525
					pass
525
					pass

Return to bug 31523