diff options
author | Tomás Touceda <chiiph@leap.se> | 2014-04-14 12:43:29 -0300 |
---|---|---|
committer | Tomás Touceda <chiiph@leap.se> | 2014-04-14 12:43:29 -0300 |
commit | 64e25fc8cf8a2f8c1fec6388e1f76312831b5f2a (patch) | |
tree | e59996b42e5e8eec30d432331556cb7458ca4555 /src/leap/bitmask/gui/loggerwindow.py | |
parent | 0483d150499b6e23ea21906b1a235d29ebbd4d87 (diff) | |
parent | 236285888bbdbb37d2fc90e0b4977c3a4bd7045b (diff) |
Merge remote-tracking branch 'refs/remotes/ivan/bug/5492_pastebin-post-limit' into develop
Diffstat (limited to 'src/leap/bitmask/gui/loggerwindow.py')
-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 |