2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-01-18 22:22:53 +00:00

Replace 'f = open()" with "with () as f" everywhere #21

Open
opened 2023-08-26 14:29:30 +01:00 by PhilipSargent · 0 comments
Member

33 occurrences, including the fairly nasty idiom
return HttpResponse(content=open(imagefile, "rb"), content_type=getmimetype(file))
which never does close the file handle ?

Find them with
cd troggle
grep -nir --exclude=".js" --exclude=".pyc" "=\s*open("|wc

33 occurrences, including the fairly nasty idiom return HttpResponse(content=open(imagefile, "rb"), content_type=getmimetype(file)) which never does close the file handle ? Find them with cd troggle grep -nir --exclude="*.js" --exclude="*.pyc" "=\s*open("|wc
xle added this to the Bug Fixes project 2025-12-08 10:33:32 +00:00
xle modified the project from Bug Fixes to Front-end Enhancements 2025-12-08 10:33:34 +00:00
xle removed this from the Front-end Enhancements project 2025-12-08 10:33:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: expo/troggle#21