Remove unwanted logger/print statements

This commit is contained in:
PCoder 2019-11-04 12:10:22 +05:30
parent c29193f6c8
commit 6faa8b82e8

View file

@ -19,7 +19,6 @@ class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
try: try:
for email in options['customer_email']: for email in options['customer_email']:
logger.debug("Creating dump for the user {}".format(email))
try: try:
cus_user = CustomUser.objects.get(email=email) cus_user = CustomUser.objects.get(email=email)
except CustomUser.DoesNotExist as dne: except CustomUser.DoesNotExist as dne:
@ -119,7 +118,6 @@ class Command(BaseCommand):
if uhk.private_key is not None: if uhk.private_key is not None:
key["Private key"] = uhk.private_key key["Private key"] = uhk.private_key
keys[uhk.name] = key keys[uhk.name] = key
print("User {} dump is follows:")
output_dict = { output_dict = {
"User details": { "User details": {
"Name": cus_user.name, "Name": cus_user.name,
@ -132,6 +130,5 @@ class Command(BaseCommand):
"SSH Keys": keys "SSH Keys": keys
} }
pprint(output_dict) pprint(output_dict)
logger.debug("Dumped user {} SUCCESSFULLY.".format(email))
except Exception as e: except Exception as e:
print(" *** Error occurred. Details {}".format(str(e))) print(" *** Error occurred. Details {}".format(str(e)))