generated from pavel.muhortov/template-python
'wwwhmptoday' source renamed to 'githmptoday'
This commit is contained in:
parent
f9d50ef65d
commit
7375df5a2c
|
@ -59,13 +59,13 @@ ip2l_download_token = ip2location_TOKEN
|
||||||
# - access to updates only by paid subscription
|
# - access to updates only by paid subscription
|
||||||
ip2l_database_code = DB1CIDR
|
ip2l_database_code = DB1CIDR
|
||||||
#
|
#
|
||||||
# wwwhmptoday - it's compilation from all other sources (https://git.hmp.today/pavel.muhortov/my_route.db)
|
# githmptoday - it's compilation from all other sources (https://git.hmp.today/pavel.muhortov/my_route.db)
|
||||||
# + all the benefits of other sources
|
# + all the benefits of other sources
|
||||||
# + all lists ready to use
|
# + all lists ready to use
|
||||||
# - you need account
|
# - you need account
|
||||||
wwwhmptoday = true
|
githmptoday = true
|
||||||
wwwhmptoday_user = username
|
githmptoday_user = username
|
||||||
wwwhmptoday_pass = password
|
githmptoday_pass = password
|
||||||
|
|
||||||
|
|
||||||
[enable-gateway]
|
[enable-gateway]
|
||||||
|
|
18
my_route.py
18
my_route.py
|
@ -452,8 +452,8 @@ class Route(Connect):
|
||||||
force_download=force_download,
|
force_download=force_download,
|
||||||
logger_alias=logger_alias
|
logger_alias=logger_alias
|
||||||
)
|
)
|
||||||
elif name == 'wwwhmptoday':
|
elif name == 'githmptoday':
|
||||||
return self.__update_source_wwwhmptoday(
|
return self.__update_source_githmptoday(
|
||||||
db_root_path=db_root_path,
|
db_root_path=db_root_path,
|
||||||
download_user=download_user,
|
download_user=download_user,
|
||||||
download_pass=download_pass,
|
download_pass=download_pass,
|
||||||
|
@ -852,7 +852,7 @@ class Route(Connect):
|
||||||
remove(db_source_file)
|
remove(db_source_file)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def __update_source_wwwhmptoday(
|
def __update_source_githmptoday(
|
||||||
self,
|
self,
|
||||||
db_root_path: str,
|
db_root_path: str,
|
||||||
download_user: str,
|
download_user: str,
|
||||||
|
@ -861,7 +861,7 @@ class Route(Connect):
|
||||||
logger_alias: str = inspect.stack()[0].function
|
logger_alias: str = inspect.stack()[0].function
|
||||||
) -> bool:
|
) -> bool:
|
||||||
local_logger = logging.getLogger(logger_alias)
|
local_logger = logging.getLogger(logger_alias)
|
||||||
if Do.args_valid(locals(), self.__update_source_wwwhmptoday.__annotations__):
|
if Do.args_valid(locals(), self.__update_source_githmptoday.__annotations__):
|
||||||
if not path.exists(db_root_path + sep + 'sources'):
|
if not path.exists(db_root_path + sep + 'sources'):
|
||||||
force_download = True
|
force_download = True
|
||||||
if force_download:
|
if force_download:
|
||||||
|
@ -1030,12 +1030,12 @@ if __name__ == "__main__":
|
||||||
enable_sources['ip2location']['db_source_code'] = (
|
enable_sources['ip2location']['db_source_code'] = (
|
||||||
conf_sources.data['ip2l_database_code']
|
conf_sources.data['ip2l_database_code']
|
||||||
)
|
)
|
||||||
if 'wwwhmptoday' in enable_sources:
|
if 'githmptoday' in enable_sources:
|
||||||
enable_sources['wwwhmptoday']['download_user'] = (
|
enable_sources['githmptoday']['download_user'] = (
|
||||||
conf_sources.data['wwwhmptoday_user']
|
conf_sources.data['githmptoday_user']
|
||||||
)
|
)
|
||||||
enable_sources['wwwhmptoday']['download_pass'] = (
|
enable_sources['githmptoday']['download_pass'] = (
|
||||||
conf_sources.data['wwwhmptoday_pass']
|
conf_sources.data['githmptoday_pass']
|
||||||
)
|
)
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user