AutoScaleConnection constructor sets debug param to None rather than 0 #393

Closed
garnaat opened this Issue Nov 8, 2011 · 3 comments

Comments

Projects
None yet
2 participants
@garnaat
Owner

garnaat commented Nov 8, 2011

This causes a problem if you try to create an AutoScaleConnection without specify a value for debug.

@RyanBalfanz

This comment has been minimized.

Show comment Hide comment
@RyanBalfanz

RyanBalfanz Jan 31, 2012

I'm having the same issue with v2.1.1.

I'm having the same issue with v2.1.1.

@garnaat

This comment has been minimized.

Show comment Hide comment
@garnaat

garnaat Jan 31, 2012

Owner

I'm unable to reproduce this. Could you give me a little more info about what you are doing and the error you are receiving?

Owner

garnaat commented Jan 31, 2012

I'm unable to reproduce this. Could you give me a little more info about what you are doing and the error you are receiving?

@RyanBalfanz

This comment has been minimized.

Show comment Hide comment
@RyanBalfanz

RyanBalfanz Jan 31, 2012

def get_launch_configuration():
    launch_config = LaunchConfiguration(name=config.autoscale_name,
        instance_type=config.instance_type,
        image_id=config.ami_id,
        key_name=config.key_name,
        security_groups=[config.security_group],
        user_data=build_script)
    return as_connection.create_launch_configuration(launch_config)

With the following ~/.boto:

[Credentials]
aws_access_key_id = "asdf"
aws_secret_access_key = "sadfsadf"

I get a TypeError and this traceback:

...
  File "/Users/rbalfanz/Development/asdf/fabfile.py", line 111, in get_autoscale_connection
    connection = AutoScaleConnection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/ec2/autoscale/__init__.py", line 107, in __init__
    https_connection_factory, path=path)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/connection.py", line 819, in __init__
    security_token=security_token)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/connection.py", line 449, in __init__
    self.debug = config.getint('Boto', 'debug', debug)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/pyami/config.py", line 155, in getint
    val = int(default)
TypeError: int() argument must be a string or a number, not 'NoneType'

But everything works fine with the [Boto] section in my ~/.boto.

def get_launch_configuration():
    launch_config = LaunchConfiguration(name=config.autoscale_name,
        instance_type=config.instance_type,
        image_id=config.ami_id,
        key_name=config.key_name,
        security_groups=[config.security_group],
        user_data=build_script)
    return as_connection.create_launch_configuration(launch_config)

With the following ~/.boto:

[Credentials]
aws_access_key_id = "asdf"
aws_secret_access_key = "sadfsadf"

I get a TypeError and this traceback:

...
  File "/Users/rbalfanz/Development/asdf/fabfile.py", line 111, in get_autoscale_connection
    connection = AutoScaleConnection(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/ec2/autoscale/__init__.py", line 107, in __init__
    https_connection_factory, path=path)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/connection.py", line 819, in __init__
    security_token=security_token)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/connection.py", line 449, in __init__
    self.debug = config.getint('Boto', 'debug', debug)
  File "/Users/rbalfanz/.virtualenvs/asdf/lib/python2.7/site-packages/boto/pyami/config.py", line 155, in getint
    val = int(default)
TypeError: int() argument must be a string or a number, not 'NoneType'

But everything works fine with the [Boto] section in my ~/.boto.

@garnaat garnaat reopened this Jan 31, 2012

@garnaat garnaat closed this in 5c72772 Jan 31, 2012

msabramo pushed a commit to msabramo/boto that referenced this issue Nov 28, 2012

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