Skip to content

Commit

Permalink
Reload the artist whitelist file after rolling back changes
Browse files Browse the repository at this point in the history
As someone was repeatedly running the update-artist-whitelist command they
would previously see a stale version of the artist file since it was hanging
around in memory. This is fixed now.
  • Loading branch information
kumar303 committed Sep 13, 2017
1 parent d5ede52 commit 6630406
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions commandcenter/commands.py
Expand Up @@ -26,15 +26,20 @@ def update_artist_whitelist():
cmd = ['git', 'checkout', artists._WHITELIST_FILE]
exec_and_print(cmd, cwd)

# This will reload the artist whitelist file
# in python memory.
artists._init()

for _ in main_generator(rewrite=True):
yield

# Show changes to the artist whitelist file
cprint('Changes made to artist whitelist:')
cmd = ['git', 'diff', artists._WHITELIST_FILE]
exec_and_print(cmd, cwd)
# This will load the new artist whitelist file
# into python memory.

# Once again, this reloads the artist whitelist file
# in python memory.
artists._init()


Expand Down

0 comments on commit 6630406

Please sign in to comment.