fix srt import
This commit is contained in:
parent
273fcb6458
commit
ad688444ce
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue