فهرست منبع

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

There is no message attribute in Python 3.
Romain 6 سال پیش
والد
کامیت
0c8e803e9d
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  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: