Update fc_block_decode.py use io

fc-fctelem
Alan Johnston 10 months ago committed by GitHub
parent 2f40045d27
commit 257a94e750
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -5,6 +5,7 @@ import logging
import random
from PIL import Image, ImageDraw, ImageFont, ImageColor
import subprocess
import io
logging.basicConfig(format='%(message)s')
# logging.warning('CC-Warning!')
@ -67,8 +68,8 @@ if __name__ == "__main__":
process_output = subprocess.run(["/home/pi/ssdv/ssdv","-d","-J", "image_file", filename], text=True)
print("\n\n RESULT: \n")
print(process_output)
for line in process_output:
s = io.StringIO(process_output)
for line in s:
if ((line.find("Image ID:")) > 0):
print("\nImage ID found!\n")
image_id_string = line.split()

Loading…
Cancel
Save

Powered by TurnKey Linux.