Bladeren bron

HUE-8737 [py3] Properly bubble up install example exception message

There is no message attribute in Python 3.
Romain 6 jaren geleden
bovenliggende
commit
0c8e803e9d
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py

+ 2 - 2
apps/beeswax/src/beeswax/management/commands/beeswax_install_examples.py

@@ -78,9 +78,9 @@ class Command(BaseCommand):
     if exception is not None:
       pretty_msg = None
 
-      if "AlreadyExistsException" in exception.message:
+      if "AlreadyExistsException" in str(exception):
         pretty_msg = _("SQL table examples already installed.")
-      if "Permission denied" in exception.message:
+      if "Permission denied" in str(exception):
         pretty_msg = _("Permission denied. Please check with your system administrator.")
 
       if pretty_msg is not None: