diff --git a/polynum_blackboard/management/commands/send-to-mycourse.py b/polynum_blackboard/management/commands/send-to-mycourse.py index 76e74a5..c4aafed 100644 --- a/polynum_blackboard/management/commands/send-to-mycourse.py +++ b/polynum_blackboard/management/commands/send-to-mycourse.py @@ -51,10 +51,10 @@ class Command(BaseCommand): try: ok, result = conn.send_file(push.request.uploadfile, [push.course_name], push.visible_to_students) push.sent = True - if ok: + if not ok: logger.info('sending succeeded') push.failure = result - logger.error('sending failed: %s', result.encode('utf-8')) + logger.error('sending failed: %r', result.encode('utf-8')) except Exception, e: logger.exception('sending failed') push.failure = unicode(e)