From: Charles Connell Date: Tue, 11 Mar 2014 17:20:42 +0000 (-0400) Subject: Handle edge case X-Git-Tag: release-20150131~148^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=07e4b8d33d8ea2230da402165fe1f16aa4095c0e;p=oweals%2Fkarmaworld.git Handle edge case --- diff --git a/karmaworld/apps/notes/management/commands/populate_filepicker.py b/karmaworld/apps/notes/management/commands/populate_filepicker.py index b8ecc8a..dcf556c 100644 --- a/karmaworld/apps/notes/management/commands/populate_filepicker.py +++ b/karmaworld/apps/notes/management/commands/populate_filepicker.py @@ -34,8 +34,11 @@ class Command(BaseCommand): print html_resp.text continue html = html_resp.text - else: + elif note.html: html = note.html + else: + print "Couldn't find any HTML for {0}".format(str(note)) + continue fp_policy_json = '{{"expiry": {0}, "call": ["pick","store","read","stat"]}}' fp_policy_json = fp_policy_json.format(int(time.time() + 31536000))