main: fix API usage

This commit is contained in:
dece 2020-11-05 21:42:02 +01:00
parent 9954067710
commit f8439dee4a

View file

@ -4,7 +4,7 @@
import argparse import argparse
import logging import logging
from scaruffi import api from scaruffi.api import ScaruffiApi
def main(): def main():
@ -22,8 +22,7 @@ def main():
args = parser.parse_args() args = parser.parse_args()
log_level = logging.DEBUG if args.verbose else logging.WARNING log_level = logging.DEBUG if args.verbose else logging.WARNING
global LOG api = ScaruffiApi(log_level=log_level)
LOG = api.setup_logging("scaruffi", level=log_level)
if args.musicians: if args.musicians:
musicians = api.get_musicians(args.offset, args.limit) musicians = api.get_musicians(args.offset, args.limit)