summaryrefslogtreecommitdiff
path: root/boto/cloudfront
diff options
context:
space:
mode:
authorAustin Marshall <oxtopus@gmail.com>2013-12-18 22:43:32 -0600
committerAustin Marshall <oxtopus@gmail.com>2013-12-18 22:43:32 -0600
commit125a8394143be713e6683bac34d7842421fe8b70 (patch)
tree4f21a53baf018500cb1264718c8d0448a29bd5e2 /boto/cloudfront
parentdcf3cbd51f5d997eb84a5bf5ec9ff20f322fa44f (diff)
downloadboto-125a8394143be713e6683bac34d7842421fe8b70.tar.gz
Consistent use of identity comparison (`is`/`is not`) for None
Diffstat (limited to 'boto/cloudfront')
-rw-r--r--boto/cloudfront/distribution.py12
-rw-r--r--boto/cloudfront/identity.py2
-rw-r--r--boto/cloudfront/invalidation.py2
3 files changed, 8 insertions, 8 deletions
diff --git a/boto/cloudfront/distribution.py b/boto/cloudfront/distribution.py
index 423cb201..dbc8d8b8 100644
--- a/boto/cloudfront/distribution.py
+++ b/boto/cloudfront/distribution.py
@@ -350,11 +350,11 @@ class Distribution(object):
self.config.cnames, self.config.comment,
self.config.trusted_signers,
self.config.default_root_object)
- if enabled != None:
+ if enabled is not None:
new_config.enabled = enabled
- if cnames != None:
+ if cnames is not None:
new_config.cnames = cnames
- if comment != None:
+ if comment is not None:
new_config.comment = comment
self.etag = self.connection.set_distribution_config(self.id, self.etag, new_config)
self.config = new_config
@@ -729,11 +729,11 @@ class StreamingDistribution(Distribution):
self.config.cnames,
self.config.comment,
self.config.trusted_signers)
- if enabled != None:
+ if enabled is not None:
new_config.enabled = enabled
- if cnames != None:
+ if cnames is not None:
new_config.cnames = cnames
- if comment != None:
+ if comment is not None:
new_config.comment = comment
self.etag = self.connection.set_streaming_distribution_config(self.id,
self.etag,
diff --git a/boto/cloudfront/identity.py b/boto/cloudfront/identity.py
index 123773d1..de79c8ac 100644
--- a/boto/cloudfront/identity.py
+++ b/boto/cloudfront/identity.py
@@ -52,7 +52,7 @@ class OriginAccessIdentity(object):
new_config = OriginAccessIdentityConfig(self.connection,
self.config.caller_reference,
self.config.comment)
- if comment != None:
+ if comment is not None:
new_config.comment = comment
self.etag = self.connection.set_origin_identity_config(self.id, self.etag, new_config)
self.config = new_config
diff --git a/boto/cloudfront/invalidation.py b/boto/cloudfront/invalidation.py
index dcc3c4c5..91ba89d9 100644
--- a/boto/cloudfront/invalidation.py
+++ b/boto/cloudfront/invalidation.py
@@ -75,7 +75,7 @@ class InvalidationBatch(object):
def to_xml(self):
"""Get this batch as XML"""
- assert self.connection != None
+ assert self.connection is not None
s = '<?xml version="1.0" encoding="UTF-8"?>\n'
s += '<InvalidationBatch xmlns="http://cloudfront.amazonaws.com/doc/%s/">\n' % self.connection.Version
for p in self.paths: