Use proper Python imports
All checks were successful
Test / test (push) Successful in 1m6s

This commit is contained in:
polyfloyd 2025-07-17 18:03:32 +02:00
parent ed33bdfcba
commit a3b5392f7f
8 changed files with 38 additions and 19 deletions

13
inflatinator/__main__.py Normal file → Executable file
View file

@ -1,10 +1,13 @@
#!/usr/bin/env python3
import logging
import os
import revbank
import sys
import inflatinator.revbank as revbank
def main(product_file):
def main_args(product_file):
log_level = os.environ.get('LOG_LEVEL', 'INFO').upper()
logging.basicConfig(level=log_level)
logging.getLogger("requests").setLevel(logging.WARNING)
@ -19,5 +22,9 @@ def main(product_file):
fd.write(new_src)
def main():
main_args(sys.argv[1])
if __name__ == '__main__':
main(sys.argv[1])
main()