From 7bcca15f0b9fc4b6755774b9e78b67198e291ee7 Mon Sep 17 00:00:00 2001 From: PCoder Date: Mon, 7 Dec 2020 10:52:06 +0530 Subject: [PATCH] Cleanup logging --- .../management/commands/fix_vm_after_celery_error.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/datacenterlight/management/commands/fix_vm_after_celery_error.py b/datacenterlight/management/commands/fix_vm_after_celery_error.py index 3286db3a..0cfdb423 100644 --- a/datacenterlight/management/commands/fix_vm_after_celery_error.py +++ b/datacenterlight/management/commands/fix_vm_after_celery_error.py @@ -57,10 +57,11 @@ class Command(BaseCommand): } cu = CustomUser.objects.get(username=user.get('username')) # Create OpenNebulaManager - self.style.SUCCESS( - 'Connecting using %s %s' % (cu.username, cu.password) + self.stdout.write( + self.style.SUCCESS( + 'Connecting using %s' % (cu.username) + ) ) - print('Connecting using %s %s' % (cu.username, cu.password)) manager = OpenNebulaManager(email=cu.username, password=cu.password) handle_metadata_and_emails(order_id, vm_id, manager, user, specs, template)