Merge pull request #86 from python-pitfalls/main

Removed a manual file handler pitfall
This commit is contained in:
Eric Romano
2023-04-03 08:30:53 -04:00
committed by GitHub

View File

@ -252,7 +252,7 @@ def load_images(img_names):
return {} return {}
for image_name in img_names: for image_name in img_names:
img = open(image_name) with open(image_name) as img:
loaded_imgs = {} loaded_imgs = {}
img_list = '' img_list = ''
img_line = ' ' img_line = ' '