Skip to content

Add data updater #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 29, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Renamed updater to update
  • Loading branch information
Ayuto committed Jul 4, 2017
commit 1abb01d5d408322a88922cc6b08066dac7191655
14 changes: 7 additions & 7 deletions addons/source-python/packages/source-python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# If True, all calls to open() with a path to a Source.Python data file will be
# logged in ../logs/file_access.log. The log entry will contain the file that
# is being accessed and a full stack trace. The logger will be removed as soon
# as setup_data_updater() is called.
# as setup_data_update() is called.
# This is a debug option to ensure that no data files are being accessed before
# the data has been updated. Release builds should have this option set to
# False.
Expand Down Expand Up @@ -86,7 +86,7 @@ def load():
setup_core_settings()
setup_logging()
setup_exception_hooks()
setup_data_updater()
setup_data_update()
setup_translations()
setup_data()
setup_global_pointers()
Expand All @@ -107,11 +107,11 @@ def unload():


# =============================================================================
# >> DATA UPDATER
# >> DATA UPDATE
# =============================================================================
def setup_data_updater():
"""Setup data updater."""
_sp_logger.log_debug('Setting up data updater...')
def setup_data_update():
"""Setup data update."""
_sp_logger.log_debug('Setting up data update...')

if LOG_FILE_OPERATIONS:
builtins.open = old_open
Expand All @@ -124,7 +124,7 @@ def setup_data_updater():

_sp_logger.log_info('Checking for data updates...')

from core.updater import is_new_data_available, update_data
from core.update import is_new_data_available, update_data

try:
if is_new_data_available():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ../core/updater.py
# ../core/update.py

"""Provides functions to update Source.Python's data files."""

Expand Down