diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-04-11 12:17:43 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-04-11 12:17:43 -0300 |
commit | 236285888bbdbb37d2fc90e0b4977c3a4bd7045b (patch) | |
tree | af43192170d771c5c37504a8a5b3e6731a7bfb4b /src/leap/bitmask | |
parent | da22a4ced468432d4a5c58bd34c74f3e445dfce5 (diff) |
Handle pastebin post limit error.
Closes #5492.
Diffstat (limited to 'src/leap/bitmask')
-rw-r--r-- | src/leap/bitmask/gui/loggerwindow.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leap/bitmask/gui/loggerwindow.py b/src/leap/bitmask/gui/loggerwindow.py index 4bf20e35..b0e45a50 100644 --- a/src/leap/bitmask/gui/loggerwindow.py +++ b/src/leap/bitmask/gui/loggerwindow.py @@ -28,7 +28,7 @@ from ui_loggerwindow import Ui_LoggerWindow from leap.bitmask.util.constants import PASTEBIN_API_DEV_KEY from leap.bitmask.util.leap_log_handler import LeapLogHandler -from leap.bitmask.util.pastebin import PastebinAPI +from leap.bitmask.util import pastebin from leap.common.check import leap_assert, leap_assert_type logger = logging.getLogger(__name__) @@ -203,7 +203,7 @@ class LoggerWindow(QtGui.QDialog): Send content to pastebin and return the link. """ content = self._current_history - pb = PastebinAPI() + pb = pastebin.PastebinAPI() link = pb.paste(PASTEBIN_API_DEV_KEY, content, paste_name="Bitmask log", paste_expire_date='1W') @@ -242,6 +242,8 @@ class LoggerWindow(QtGui.QDialog): logger.error(repr(failure)) msg = self.tr("Sending logs to Pastebin failed!") + if failure.check(pastebin.PostLimitError): + msg = self.tr('Maximum posts per day reached') # We save the dialog in an instance member to avoid dialog being # deleted right after we exit this method |