From: lisali Date: Fri, 28 Aug 2015 09:50:14 +0000 (+0000) Subject: Minor optimization X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1ac0b1ce37f9a82998c0fca33d7448140fb47078;p=openstack-build%2Fcinder-build.git Minor optimization Remove the unnecessary comparison statements in manager.py. Change-Id: If276aa78be089e75aa56310eb606ba3dccb9b9b1 --- diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index e765693fb..6b2b3db0e 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -1827,10 +1827,7 @@ class VolumeManager(manager.SchedulerDependentManager): volume_ref = self.db.volume_get(ctxt, volume_id) status_update = {'status': volume_ref['previous_status']} - if context.project_id != volume_ref['project_id']: - project_id = volume_ref['project_id'] - else: - project_id = context.project_id + project_id = volume_ref['project_id'] try: # NOTE(flaper87): Verify the driver is enabled