summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-07-26 19:35:12 +0000
committerJohannes Erdfelt <johannes.erdfelt@rackspace.com>2012-07-26 19:36:42 +0000
commit6c084991bfdafda7d75d0a49d4359b42b9c6451f (patch)
tree602bfda3997ea137dcfe25794a2991d436a86921 /nova/api
parentc0eef1ccc796ecdb6ef036daafaafe1214d05c88 (diff)
Avoid using 'is' operator when comparing strings
The 'is' operator compares identity, not value. Python doesn't guarantee that two strings that are the same will also be the same object. Change-Id: I2d7e7947b14272fa2a82d5e8eefa95dcaba375f7
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py
index a2f73e852..a5274e03b 100644
--- a/nova/api/openstack/__init__.py
+++ b/nova/api/openstack/__init__.py
@@ -80,7 +80,7 @@ class FaultWrapper(base_wsgi.Middleware):
class APIMapper(routes.Mapper):
def routematch(self, url=None, environ=None):
- if url is "":
+ if url == "":
result = self._match("", environ)
return result[0], result[1]
return routes.Mapper.routematch(self, url, environ)