Skip to content

Commit

Permalink
handle exception
Browse files Browse the repository at this point in the history
pagure don’t accept empty content
  • Loading branch information
yangl1996 committed Jun 14, 2015
1 parent 9654ea5 commit 1020063
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def do_POST(self):
print("======================================")
pagure_title = '[' + str(info['id']) + ']: ' + info['title'] + ' by ' + info['creator']
# TODO: now containing all the metadata in the title, should use a more elegant solution
if info['content'] == '':
info['content'] = "*Not specified*"
pagure_payload = {'title': pagure_title, 'issue_content': info['content'],
'status': "Open"}
pagure_URL = "https://pagure.io/api/0/" + pagureRepo + "/new_issue"
Expand Down

0 comments on commit 1020063

Please sign in to comment.