From 1ac0b1ce37f9a82998c0fca33d7448140fb47078 Mon Sep 17 00:00:00 2001 From: lisali Date: Fri, 28 Aug 2015 09:50:14 +0000 Subject: [PATCH] Minor optimization Remove the unnecessary comparison statements in manager.py. Change-Id: If276aa78be089e75aa56310eb606ba3dccb9b9b1 --- cinder/volume/manager.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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 -- 2.45.2