Replace fullstops in returned keynames

def _key_dot_replace(self, rdict):
        """Replace fullstops in returned keynames"""
        temp_dict = {}
        for key, value in iteritems(rdict):
            if isinstance(value, dict):
                value = self._key_dot_replace(value)
            temp_dict[key.replace('.', '_')] = value
        return temp_dict