From 6c084991bfdafda7d75d0a49d4359b42b9c6451f Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Thu, 26 Jul 2012 19:35:12 +0000 Subject: 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 --- nova/api/openstack/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/api') 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) -- cgit