Commits

Marc-Alexandre Chan committed f346b59

Fix error messages in bootstrap scripts

Comments (0)

Files changed (2)

         minibot_app = DailyPromptMinibot('minibot.ini')
         minibot_app.init_resources()
     except IOError as e:
-        sys.exit("Error opening configuration file: " + e.message)
+        sys.exit("Error opening configuration file: " + repr(e))
     except (ConfigValueError, ValueError) as e:
-        sys.exit("Invalid configuration value: " + e.message)
+        sys.exit("Invalid configuration value: " + repr(e))
     except InvalidUserPass as e:
-        sys.exit("Error logging into Reddit account: " + e.message)
+        sys.exit("Error logging into Reddit account: " + repr(e))
     except HTTPError as e:
-        sys.exit("An error occurred accessing Reddit: " + e.message)
+        sys.exit("An error occurred accessing Reddit: " + repr(e))
     except (SQLAlchemyError, DBAPIError):
         raise # let Python handle it. This line just documents the possibility
 
     try:
         minibot_app = DailyPromptMinibot('minibot.ini')
     except IOError as e:
-        sys.exit("Error opening configuration file: " + e.message)
+        sys.exit("Error opening configuration file: " + repr(e))
     except (ConfigValueError, ValueError) as e:
-        sys.exit("Invalid configuration value: " + e.message)
+        sys.exit("Invalid configuration value: " + repr(e))
 
     try:
         daemon = DaemonRunner(minibot_app)
     except DaemonRunnerInvalidActionError as e:
         sys.exit(str(e))
     except DaemonRunnerStartFailureError as e:
-        sys.exit("Failed to start daemon: " + e.message)
+        sys.exit("Failed to start daemon: " + repr(e))
     except DaemonRunnerStopFailure as e:
-        sys.exit("Failed to end daemon: " + e.message)
+        sys.exit("Failed to end daemon: " + repr(e))
     except InvalidUserPass as e:
-        sys.exit("Error logging into Reddit account: " + e.message)
+        sys.exit("Error logging into Reddit account: " + repr(e))
     except HTTPError as e:
-        sys.exit("An error occurred accessing Reddit: " + e.message)
+        sys.exit("An error occurred accessing Reddit: " + repr(e))
     except (SQLAlchemyError, DBAPIError):
         raise # let Python handle it. This line just documents the possibility