File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ import logging
12from itertools import chain
23
4+
5+ LOGGER = logging .getLogger (__name__ )
6+
37# Default country code.
48default_code = "XX"
59
@@ -378,7 +382,7 @@ def country_code(country):
378382
379383 # Default picked?
380384 if country_code == default_code :
381- print ( "No country_code found for '%s '. Using '%s '!" % ( country , country_code ) )
385+ LOGGER . warning ( f "No country_code found for '{ country } '. Using '{ country_code } '!" )
382386
383387 # Return.
384388 return country_code
Original file line number Diff line number Diff line change 1+ import logging
12from io import BytesIO , StringIO
23from zipfile import ZipFile , ZipInfo
34
78from .countrycodes import country_code
89
910
11+ LOGGER = logging .getLogger (__name__ )
12+
1013# Fetching of the populations.
1114def fetch_populations ():
1215 """
@@ -15,7 +18,7 @@ def fetch_populations():
1518 :returns: The mapping of populations.
1619 :rtype: dict
1720 """
18- print ("Fetching populations..." )
21+ LOGGER . info ("Fetching populations..." )
1922
2023 # Mapping of populations
2124 mappings = {}
You can’t perform that action at this time.
0 commit comments