Преглед изворни кода

Fix in literal identity check which happened to work.

Signed-off-by: Nashwan Azhari <nazhari@cloudbasesolutions.com>
Nashwan Azhari пре 2 година
родитељ
комит
86c23b70a0
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      coriolis/conductor/rpc/server.py

+ 1 - 1
coriolis/conductor/rpc/server.py

@@ -395,7 +395,7 @@ class ConductorServerEndpoint(object):
     def delete_endpoint(self, ctxt, endpoint_id):
     def delete_endpoint(self, ctxt, endpoint_id):
         q_replicas_count = db_api.get_endpoint_replicas_count(
         q_replicas_count = db_api.get_endpoint_replicas_count(
             ctxt, endpoint_id)
             ctxt, endpoint_id)
-        if q_replicas_count is not 0:
+        if q_replicas_count != 0:
             raise exception.NotAuthorized("%s replicas would be orphaned!" %
             raise exception.NotAuthorized("%s replicas would be orphaned!" %
                                           q_replicas_count)
                                           q_replicas_count)
         db_api.delete_endpoint(ctxt, endpoint_id)
         db_api.delete_endpoint(ctxt, endpoint_id)