Fixed some error messages

This commit is contained in:
Michael Lazar
2016-06-23 23:06:41 -07:00
parent a2a0001943
commit a5a42fc5da
2 changed files with 5 additions and 2 deletions

View File

@@ -120,9 +120,12 @@ class SubredditPage(Page):
submission_info = docs.SUBMISSION_FILE.format(name=name)
with self.term.open_editor(submission_info) as text:
if not text or '\n' not in text:
if not text:
self.term.show_notification('Canceled')
return
elif '\n' not in text:
self.term.show_notification('Missing body')
return
title, content = text.split('\n', 1)
with self.term.loader('Posting', delay=0):