Browse code

* S3/CloudFront.py: Fix warning with Python 2.7

git-svn-id: https://s3tools.svn.sourceforge.net/svnroot/s3tools/s3cmd/trunk@471 830e0280-6d2a-0410-9c65-932aecc39d9d

Michal Ludvig authored on 2011/03/30 19:32:31
Showing 2 changed files
... ...
@@ -1,5 +1,6 @@
1 1
 2011-03-30  Michal Ludvig  <mludvig@logix.net.nz>
2 2
 
3
+	* S3/CloudFront.py: Fix warning with Python 2.7
3 4
 	* S3/CloudFront.py: Cmd._get_dist_name_for_bucket() moved to
4 5
 	  CloudFront class.
5 6
 
... ...
@@ -123,10 +123,10 @@ class DistributionConfig(object):
123 123
 	EMPTY_CONFIG = "<DistributionConfig><Origin/><CallerReference/><Enabled>true</Enabled></DistributionConfig>"
124 124
 	xmlns = "http://cloudfront.amazonaws.com/doc/2010-07-15/"
125 125
 	def __init__(self, xml = None, tree = None):
126
-		if not xml:
126
+		if xml is None:
127 127
 			xml = DistributionConfig.EMPTY_CONFIG
128 128
 
129
-		if not tree:
129
+		if tree is None:
130 130
 			tree = getTreeFromXml(xml)
131 131
 
132 132
 		if tree.tag != "DistributionConfig":