Replace dict.iteritems() with dict.items()
This change adds Python 3 compatibility to the modified code. Replace also six.iteritems(obj) with obj.items(). The iteritems() method of Python 2 dictionaries was renamed to items() on Python 3. As discussed on the openstack-dev mailing list, iteritems() must be replaced with items(), six.iteritems() should not be used. In OpenStack, the overhead of creating a temporary list with dict.items() on Python 2 is negligible. Blueprint cinder-python3 Change-Id: Ic3d8fd6b71d2c9f21929b0d6bf68c8f84a5e2567
This commit is contained in:
		@@ -338,7 +338,7 @@ class ConfigCommands(object):
 | 
			
		||||
        if param:
 | 
			
		||||
            print('%s = %s' % (param, CONF.get(param)))
 | 
			
		||||
        else:
 | 
			
		||||
            for key, value in CONF.iteritems():
 | 
			
		||||
            for key, value in CONF.items():
 | 
			
		||||
                print('%s = %s' % (key, value))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user