From 51f433d5617bfec142e72885aed7e35cd53162af Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Tue, 8 Jun 2021 09:24:48 +0100 Subject: [PATCH] Update vapp.py Remove the need to call "Get_logger" which inadvertently creates an empty `vcd_sdk.log` file in your home directory, which seems unuseful for a single log across the whole project. --- pyvcloud/vcd/vapp.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyvcloud/vcd/vapp.py b/pyvcloud/vcd/vapp.py index 981fc24c..1de1212c 100644 --- a/pyvcloud/vcd/vapp.py +++ b/pyvcloud/vcd/vapp.py @@ -24,7 +24,6 @@ from pyvcloud.vcd.client import EntityType from pyvcloud.vcd.client import FenceMode from pyvcloud.vcd.client import find_link -from pyvcloud.vcd.client import get_logger from pyvcloud.vcd.client import MetadataDomain from pyvcloud.vcd.client import MetadataValueType from pyvcloud.vcd.client import MetadataVisibility @@ -42,7 +41,6 @@ from pyvcloud.vcd.vm import VM DEFAULT_CHUNK_SIZE = 10 * 1024 * 1024 -LOGGER = get_logger() class VApp(object): @@ -1604,8 +1602,9 @@ def upgrade_virtual_hardware(self): self.client.get_task_monitor().wait_for_success(task) no_of_vm_upgraded += 1 except OperationNotSupportedException: - LOGGER.error('Operation not supported for vm ' + - vm.get('name')) + raise OperationNotSupportedException( + 'Operation not supported for vm' + vm.get('name') + ) return no_of_vm_upgraded def vapp_clone(self, vdc_href, vapp_name, description, source_delete):