Yaz Hobooti commited on
Commit
e2ac1ed
·
1 Parent(s): 8d331e6

Fix syntax error in _decode_zbar function - move return inside try block

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1135,12 +1135,12 @@ def _decode_zbar(pil: Image.Image) -> List[Dict[str,Any]]:
1135
  out=[]
1136
  for d in res:
1137
  data = d.data.decode("utf-8","ignore") if isinstance(d.data,(bytes,bytearray)) else str(d.data)
1138
- out.append({
1139
  "type": d.type, "data": data,
1140
  "left": d.rect.left, "top": d.rect.top,
1141
  "width": d.rect.width, "height": d.rect.height
1142
- })
1143
- return out
1144
  except Exception:
1145
  return []
1146
 
 
1135
  out=[]
1136
  for d in res:
1137
  data = d.data.decode("utf-8","ignore") if isinstance(d.data,(bytes,bytearray)) else str(d.data)
1138
+ out.append({
1139
  "type": d.type, "data": data,
1140
  "left": d.rect.left, "top": d.rect.top,
1141
  "width": d.rect.width, "height": d.rect.height
1142
+ })
1143
+ return out
1144
  except Exception:
1145
  return []
1146