fix srt import

This commit is contained in:
j 2012-06-18 18:22:27 +02:00
parent 273fcb6458
commit ad688444ce

View file

@ -549,12 +549,15 @@ class Client(object):
sys.exit(1) sys.exit(1)
for s in ox.srt.load(filename): for s in ox.srt.load(filename):
r = self.api.addAnnotation({ r = self.api.addAnnotation({
'item;': item, 'item': item,
'layer;': layer, 'layer': layer,
'in': s['in'], 'in': s['in'],
'out': s['out'], 'out': s['out'],
'value': s['value'], 'value': s['value'],
}) })
if r['status']['code'] == 400:
print 'failed'
sys.exit(1)
if r['status']['code'] == 403: if r['status']['code'] == 403:
print 'permission deinied' print 'permission deinied'
sys.exit(1) sys.exit(1)