Skip to content

Commit

Permalink
fix false "endswith"=jpg
Browse files Browse the repository at this point in the history
  • Loading branch information
haverland committed Feb 11, 2023
1 parent 52690fd commit 1f606be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion collectmeterdigits/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def readimages(servername, output_dir, daysback=15):
path = output_dir + "/" + servername + "/" + picturedate + "/" + hour
os.makedirs(path, exist_ok=True)
for url in urls:
if (url[-4] != 'jpg'):
if (url[-3:] != 'jpg'):
continue
prefix = os.path.basename(url).split('_', 1)[0]
if (prefix == os.path.basename(url)):
Expand Down

0 comments on commit 1f606be

Please sign in to comment.