Fix for boto/rds/parametergroup.py merge method for integer value type when value is 0 #747

Open
mdgbutterfly opened this Issue May 11, 2012 · 1 comment

Comments

Projects
None yet
2 participants

All,

I would like to report that I had an issue when trying to set an RDS MySQL server variable with the integer type of 0 value, such as long_query_time.

The fix for that was to modify the merge method of the Parameter class (boto/rds/parametergroup.py) as describe below:

def merge(self, d, i):

    prefix = 'Parameters.member.%d.' % i
    if self.name:
        d[prefix+'ParameterName'] = self.name

    if self._value:
        d[prefix+'ParameterValue'] = self._value
    else:
        if (type(self._value)) == bool:
            d[prefix+'ParameterValue'] = self._value

        # start fix
        if (type(self._value)) == int:
            d[prefix+'ParameterValue'] = self._value
        # end fix

    if self.apply_type:
        d[prefix+'ApplyMethod'] = self.apply_method

I was wondering whether the change could be included in the next release of the python library.

Thanks,

mdgbutterfly

Owner

garnaat commented May 15, 2012

I believe this has already been addressed in #707

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment