Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Tweaked exception wording.
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-lazar committed Dec 8, 2015
1 parent 9d2a6af commit cefdfb3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions rtv/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class LoadScreen(object):
(praw.errors.OAuthException, 'Not logged in'),
(praw.errors.OAuthScopeRequired, 'Not logged in'),
(praw.errors.LoginRequired, 'Not logged in'),
(praw.errors.InvalidCaptcha, 'Error, captcha required'),
(praw.errors.PRAWException, '{0.__class__.__name__}'),
(requests.exceptions.RequestException, '{0.__class__.__name__}'),
]
Expand Down
4 changes: 2 additions & 2 deletions rtv/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def delete_item(self):

prompt = 'Are you sure you want to delete this? (y/n): '
if not self.term.prompt_y_or_n(prompt):
self.term.show_notification('Aborted')
self.term.show_notification('Canceled')
return

with self.term.loader('Deleting', delay=0):
Expand Down Expand Up @@ -220,7 +220,7 @@ def edit(self):

text = self.term.open_editor(info)
if text == content:
self.term.show_notification('Aborted')
self.term.show_notification('Canceled')
return

with self.term.loader('Editing', delay=0):
Expand Down
2 changes: 1 addition & 1 deletion rtv/submission.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def add_comment(self):

comment = self.term.open_editor(comment_info)
if not comment:
self.term.show_notification('Aborted')
self.term.show_notification('Canceled')
return

with self.term.loader('Posting', delay=0):
Expand Down
2 changes: 1 addition & 1 deletion rtv/subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def post_submission(self):
submission_info = docs.SUBMISSION_FILE.format(name=name)
text = self.term.open_editor(submission_info)
if not text or '\n' not in text:
self.term.show_notification('Aborted')
self.term.show_notification('Canceled')
return

title, content = text.split('\n', 1)
Expand Down
2 changes: 1 addition & 1 deletion rtv/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def open_browser(self, url):
# If it blocks or returns an error, something went wrong.
try:
start = time.time()
while time.time() - start < 5:
while time.time() - start < 10:
code = p.poll()
if code == 0:
break # Success
Expand Down
2 changes: 1 addition & 1 deletion tests/test_subreddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def test_subreddit_post(subreddit_page, terminal, reddit, refresh_token):
with mock.patch.object(terminal, 'open_editor'):
terminal.open_editor.return_value = 'title'
subreddit_page.controller.trigger('c')
text = "Aborted".encode('utf-8')
text = 'Canceled'.encode('utf-8')
terminal.stdscr.subwin.addstr.assert_called_with(1, 1, text)

# Post a fake submission
Expand Down

0 comments on commit cefdfb3

Please sign in to comment.