diff options
Diffstat (limited to 'jfr_playoff')
-rw-r--r-- | jfr_playoff/gui/__init__.py | 2 | ||||
-rw-r--r-- | jfr_playoff/remote.py | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py index 5d9e40f..70b8ac8 100644 --- a/jfr_playoff/gui/__init__.py +++ b/jfr_playoff/gui/__init__.py @@ -11,6 +11,7 @@ import tkMessageBox as tkmb from jfr_playoff.filemanager import PlayoffFileManager from jfr_playoff.generator import PlayoffGenerator +from jfr_playoff.remote import RemoteUrl as p_remote from jfr_playoff.settings import PlayoffSettings from .tabs import * @@ -185,6 +186,7 @@ class PlayoffGUI(tk.Tk): self._tempPath = os.path.join( tempDir, next(tempfile._get_candidate_names())) config['output'] = self._tempPath + '.html' + p_remote.clear_cache() settings = PlayoffSettings(config_obj=config) generator = PlayoffGenerator(settings) content = generator.generate_content() diff --git a/jfr_playoff/remote.py b/jfr_playoff/remote.py index 6fb7e36..74d75b5 100644 --- a/jfr_playoff/remote.py +++ b/jfr_playoff/remote.py @@ -29,3 +29,7 @@ class RemoteUrl: @classmethod def fetch(cls, url): return bs(RemoteUrl.fetch_raw(url), 'lxml') + + @classmethod + def clear_cache(cls): + cls.url_cache = {} |