소스 검색

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: