Jigsaw-Code / Intra

An experimental tool that allows you to test new DNS-over-HTTPS services on Android
Apache License 2.0
1.54k stars 260 forks source link

Refactoring dbip_shrink.py #475

Closed theonlykingpin closed 1 year ago

theonlykingpin commented 1 year ago

In python It's more recommended to open files with a context manager so in cases of any unexpected error, context manager can handle situation and close the files properly. it could also close the file or files automatically after completed operation. and therefore cleaner and more readable code were provided. also some variable name improvement and some indentations fixes done.