From: Sapan Bhatia Date: Fri, 22 Aug 2014 07:07:59 +0000 (-0400) Subject: Sometimes, backend_status can fail because of unicode issues. Ignore X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=9c308fca43f8248a4d0880791b6fd3a8a2acc71d;p=plstackapi.git Sometimes, backend_status can fail because of unicode issues. Ignore for now. --- diff --git a/planetstack/openstack_observer/syncstep.py b/planetstack/openstack_observer/syncstep.py index 4852e43..ad148b5 100644 --- a/planetstack/openstack_observer/syncstep.py +++ b/planetstack/openstack_observer/syncstep.py @@ -93,10 +93,15 @@ class SyncStep: except: o.backend_status = str_e + # TOFIX: + # DatabaseError: value too long for type character varying(140) if (o.pk): - o.save(update_fields=['backend_status']) + try: + o.save(update_fields=['backend_status']) + except: + print "Could not update backend status field!" + pass - logger.log_exc("sync step failed!") failed.append(o) return failed