Skip to content

Commit

Permalink
Updated all old-style inheritance calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
toastdriven committed Dec 23, 2013
1 parent 45e1884 commit 39a997f
Show file tree
Hide file tree
Showing 98 changed files with 372 additions and 357 deletions.
2 changes: 1 addition & 1 deletion boto/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class AnonAuthHandler(AuthHandler, HmacKeys):
capability = ['anon']

def __init__(self, host, config, provider):
AuthHandler.__init__(self, host, config, provider)
super(AnonAuthHandler, self).__init__(host, config, provider)

def add_auth(self, http_request, **kwargs):
pass
Expand Down
4 changes: 2 additions & 2 deletions boto/beanstalk/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint)
self.region = region
AWSQueryConnection.__init__(self, aws_access_key_id,
super(Layer1, self).__init__(aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
proxy_user, proxy_pass,
Expand Down Expand Up @@ -1116,7 +1116,7 @@ def update_environment(self, environment_id=None, environment_name=None,
:type tier_version: string
:type tier_version: The version of the tier. Valid values
currently are "1.0". Defaults to "1.0".
:raises: InsufficientPrivilegesException
"""
params = {}
Expand Down
2 changes: 1 addition & 1 deletion boto/cloudformation/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint, CloudFormationConnection)
self.region = region
AWSQueryConnection.__init__(self, aws_access_key_id,
super(CloudFormationConnection, self).__init__(aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
proxy_user, proxy_pass,
Expand Down
2 changes: 1 addition & 1 deletion boto/cloudfront/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
port=None, proxy=None, proxy_port=None,
host=DefaultHost, debug=0, security_token=None,
validate_certs=True):
AWSAuthConnection.__init__(self, host,
super(CloudFrontConnection, self).__init__(host,
aws_access_key_id, aws_secret_access_key,
True, port, proxy, proxy_port, debug=debug,
security_token=security_token,
Expand Down
9 changes: 5 additions & 4 deletions boto/cloudfront/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class StreamingDistributionConfig(DistributionConfig):
def __init__(self, connection=None, origin='', enabled=False,
caller_reference='', cnames=None, comment='',
trusted_signers=None, logging=None):
DistributionConfig.__init__(self, connection=connection,
super(StreamingDistributionConfig, self).__init__(connection=connection,
origin=origin, enabled=enabled,
caller_reference=caller_reference,
cnames=cnames, comment=comment,
Expand Down Expand Up @@ -684,16 +684,17 @@ class StreamingDistribution(Distribution):

def __init__(self, connection=None, config=None, domain_name='',
id='', last_modified_time=None, status=''):
Distribution.__init__(self, connection, config, domain_name,
id, last_modified_time, status)
super(StreamingDistribution, self).__init__(connection, config,
domain_name, id, last_modified_time, status)
self._object_class = StreamingObject

def startElement(self, name, attrs, connection):
if name == 'StreamingDistributionConfig':
self.config = StreamingDistributionConfig()
return self.config
else:
return Distribution.startElement(self, name, attrs, connection)
return super(StreamingDistribution, self).startElement(name, attrs,
connection)

def update(self, enabled=None, cnames=None, comment=None):
"""
Expand Down
8 changes: 4 additions & 4 deletions boto/cloudfront/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
Expand All @@ -24,7 +24,7 @@
class Object(Key):

def __init__(self, bucket, name=None):
Key.__init__(self, bucket, name=name)
super(Object, self).__init__(bucket, name=name)
self.distribution = bucket.distribution

def __repr__(self):
Expand All @@ -43,6 +43,6 @@ def url(self, scheme='http'):
class StreamingObject(Object):

def url(self, scheme='rtmp'):
return Object.url(self, scheme)
return super(StreamingObject, self).url(scheme)



2 changes: 1 addition & 1 deletion boto/cloudtrail/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(self, **kwargs):
if 'host' not in kwargs:
kwargs['host'] = region.endpoint

AWSQueryConnection.__init__(self, **kwargs)
super(CloudTrailConnection, self).__init__(**kwargs)
self.region = region

def _required_auth_capability(self):
Expand Down
4 changes: 2 additions & 2 deletions boto/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,7 @@ def _mexe(self, request, sender=None, override_num_retries=None,
# not include the port.
if 's3' not in self._required_auth_capability():
self.set_host_header(request)

if callable(sender):
response = sender(connection, request.method, request.path,
request.body, request.headers)
Expand Down Expand Up @@ -1034,7 +1034,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
proxy_user=None, proxy_pass=None, host=None, debug=0,
https_connection_factory=None, path='/', security_token=None,
validate_certs=True):
AWSAuthConnection.__init__(self, host, aws_access_key_id,
super(AWSQueryConnection, self).__init__(host, aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy,
proxy_port, proxy_user, proxy_pass,
Expand Down
4 changes: 2 additions & 2 deletions boto/contrib/ymlmessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
Expand Down Expand Up @@ -43,7 +43,7 @@ class YAMLMessage(Message):

def __init__(self, queue=None, body='', xml_attrs=None):
self.data = None
Message.__init__(self, queue, body)
super(YAMLMessage, self).__init__(queue, body)

def set_body(self, body):
self.data = yaml.load(body)
Expand Down
2 changes: 1 addition & 1 deletion boto/datapipeline/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(self, **kwargs):
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint)
kwargs['host'] = region.endpoint
AWSQueryConnection.__init__(self, **kwargs)
super(DataPipelineConnection, self).__init__(**kwargs)
self.region = region

def _required_auth_capability(self):
Expand Down
2 changes: 1 addition & 1 deletion boto/directconnect/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, **kwargs):
if 'host' not in kwargs:
kwargs['host'] = region.endpoint

AWSQueryConnection.__init__(self, **kwargs)
super(DirectConnectConnection, self).__init__(**kwargs)
self.region = region

def _required_auth_capability(self):
Expand Down
2 changes: 1 addition & 1 deletion boto/dynamodb/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
break

self.region = region
AWSAuthConnection.__init__(self, self.region.endpoint,
super(Layer1, self).__init__(self.region.endpoint,
aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
Expand Down
2 changes: 1 addition & 1 deletion boto/dynamodb2/layer1.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def __init__(self, **kwargs):
if 'host' not in kwargs:
kwargs['host'] = region.endpoint

AWSQueryConnection.__init__(self, **kwargs)
super(DynamoDBConnection, self).__init__(**kwargs)
self.region = region
self._validate_checksums = boto.config.getbool(
'DynamoDB', 'validate_checksums', validate_checksums)
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/address.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Address(EC2Object):
"""

def __init__(self, connection=None, public_ip=None, instance_id=None):
EC2Object.__init__(self, connection)
super(Address, self).__init__(connection)
self.connection = connection
self.public_ip = public_ip
self.instance_id = instance_id
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/autoscale/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
self.DefaultRegionEndpoint,
AutoScaleConnection)
self.region = region
AWSQueryConnection.__init__(self, aws_access_key_id,
super(AutoScaleConnection, self).__init__(aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
proxy_user, proxy_pass,
Expand Down
10 changes: 5 additions & 5 deletions boto/ec2/bundleinstance.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

"""
Represents an EC2 Bundle Task
Represents an EC2 Bundle Task
"""

from boto.ec2.ec2object import EC2Object

class BundleInstanceTask(EC2Object):

def __init__(self, connection=None):
EC2Object.__init__(self, connection)
super(BundleInstanceTask, self).__init__(connection)
self.id = None
self.instance_id = None
self.progress = None
Expand All @@ -38,7 +38,7 @@ def __init__(self, connection=None):
self.prefix = None
self.upload_policy = None
self.upload_policy_signature = None
self.update_time = None
self.update_time = None
self.code = None
self.message = None

Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/cloudwatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
if self.region.name == 'eu-west-1':
validate_certs = False

AWSQueryConnection.__init__(self, aws_access_key_id,
super(CloudWatchConnection, self).__init__(aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
proxy_user, proxy_pass,
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint)
self.region = region
AWSQueryConnection.__init__(self, aws_access_key_id,
super(EC2Connection, self).__init__(aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
proxy_user, proxy_pass,
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/ec2object.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TaggedEC2Object(EC2Object):
"""

def __init__(self, connection=None):
EC2Object.__init__(self, connection)
super(TaggedEC2Object, self).__init__(connection)
self.tags = TagSet()

def startElement(self, name, attrs, connection):
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/elb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __init__(self, aws_access_key_id=None, aws_secret_access_key=None,
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint)
self.region = region
AWSQueryConnection.__init__(self, aws_access_key_id,
super(ELBConnection, self).__init__(aws_access_key_id,
aws_secret_access_key,
is_secure, port, proxy, proxy_port,
proxy_user, proxy_pass,
Expand Down
4 changes: 2 additions & 2 deletions boto/ec2/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Image(TaggedEC2Object):
"""

def __init__(self, connection=None):
TaggedEC2Object.__init__(self, connection)
super(Image, self).__init__(connection)
self.id = None
self.location = None
self.state = None
Expand Down Expand Up @@ -75,7 +75,7 @@ def __repr__(self):
return 'Image:%s' % self.id

def startElement(self, name, attrs, connection):
retval = TaggedEC2Object.startElement(self, name, attrs, connection)
retval = super(Image, self).startElement(name, attrs, connection)
if retval is not None:
return retval
if name == 'blockDeviceMapping':
Expand Down
6 changes: 3 additions & 3 deletions boto/ec2/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Reservation(EC2Object):
Reservation.
"""
def __init__(self, connection=None):
EC2Object.__init__(self, connection)
super(Reservation, self).__init__(connection)
self.id = None
self.owner_id = None
self.groups = []
Expand Down Expand Up @@ -211,7 +211,7 @@ class Instance(TaggedEC2Object):
"""

def __init__(self, connection=None):
TaggedEC2Object.__init__(self, connection)
super(Instance, self).__init__(connection)
self.id = None
self.dns_name = None
self.public_dns_name = None
Expand Down Expand Up @@ -288,7 +288,7 @@ def placement_tenancy(self):
return self._placement.tenancy

def startElement(self, name, attrs, connection):
retval = TaggedEC2Object.startElement(self, name, attrs, connection)
retval = super(Instance, self).startElement(name, attrs, connection)
if retval is not None:
return retval
if name == 'monitoring':
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/keypair.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class KeyPair(EC2Object):

def __init__(self, connection=None):
EC2Object.__init__(self, connection)
super(KeyPair, self).__init__(connection)
self.name = None
self.fingerprint = None
self.material = None
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/launchspecification.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def endElement(self, name, value, connection):
class LaunchSpecification(EC2Object):

def __init__(self, connection=None):
EC2Object.__init__(self, connection)
super(LaunchSpecification, self).__init__(connection)
self.key_name = None
self.instance_type = None
self.image_id = None
Expand Down
5 changes: 3 additions & 2 deletions boto/ec2/networkinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class NetworkInterface(TaggedEC2Object):
"""

def __init__(self, connection=None):
TaggedEC2Object.__init__(self, connection)
super(NetworkInterface, self).__init__(connection)
self.id = None
self.subnet_id = None
self.vpc_id = None
Expand All @@ -119,7 +119,8 @@ def __repr__(self):
return 'NetworkInterface:%s' % self.id

def startElement(self, name, attrs, connection):
retval = TaggedEC2Object.startElement(self, name, attrs, connection)
retval = super(NetworkInterface, self).startElement(name, attrs,
connection)
if retval is not None:
return retval
if name == 'groupSet':
Expand Down
2 changes: 1 addition & 1 deletion boto/ec2/placementgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
class PlacementGroup(EC2Object):

def __init__(self, connection=None, name=None, strategy=None, state=None):
EC2Object.__init__(self, connection)
super(PlacementGroup, self).__init__(connection)
self.name = name
self.strategy = strategy
self.state = state
Expand Down
6 changes: 3 additions & 3 deletions boto/ec2/regioninfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
Expand All @@ -27,8 +27,8 @@ class EC2RegionInfo(RegionInfo):
"""
Represents an EC2 Region
"""

def __init__(self, connection=None, name=None, endpoint=None):
from boto.ec2.connection import EC2Connection
RegionInfo.__init__(self, connection, name, endpoint,
super(EC2RegionInfo, self).__init__(connection, name, endpoint,
EC2Connection)
Loading

0 comments on commit 39a997f

Please sign in to comment.