Coding style.
Finish moving _CACHE_PATH to tools.
This commit is contained in:
parent
5c75832efb
commit
736dd3a701
2 changed files with 5 additions and 9 deletions
9
vigil
9
vigil
|
|
@ -89,9 +89,6 @@ def _log_error(message=None):
|
|||
log_file.write(message)
|
||||
|
||||
|
||||
_CACHE_PATH = tools._CACHE_PATH
|
||||
|
||||
|
||||
def reverse_style(style):
|
||||
return termstr.CharStyle(style.bg_color, style.fg_color, style.is_bold,
|
||||
style.is_underlined)
|
||||
|
|
@ -439,7 +436,7 @@ class Log:
|
|||
|
||||
GREY_BOLD_STYLE = termstr.CharStyle(termstr.Color.grey_100, is_bold=True)
|
||||
GREEN_STYLE = termstr.CharStyle(termstr.Color.green)
|
||||
LOG_PATH = os.path.join(_CACHE_PATH, "log")
|
||||
LOG_PATH = os.path.join(tools._CACHE_PATH, "log")
|
||||
|
||||
def __init__(self, appearance_changed_event):
|
||||
self._appearance_changed_event = appearance_changed_event
|
||||
|
|
@ -921,7 +918,7 @@ def main(root_path, worker_count=multiprocessing.cpu_count()*2,
|
|||
appearance_changed_event = threading.Event()
|
||||
is_first_run = True
|
||||
try:
|
||||
pickle_path = os.path.join(_CACHE_PATH, "summary.pickle")
|
||||
pickle_path = os.path.join(tools._CACHE_PATH, "summary.pickle")
|
||||
with gzip.open(pickle_path, "rb") as file_:
|
||||
screen = pickle.load(file_)
|
||||
except FileNotFoundError:
|
||||
|
|
@ -1027,7 +1024,7 @@ def chdir(path):
|
|||
|
||||
|
||||
def manage_cache(root_path):
|
||||
cache_path = os.path.join(root_path, _CACHE_PATH)
|
||||
cache_path = os.path.join(root_path, tools._CACHE_PATH)
|
||||
timestamp_path = os.path.join(cache_path, "creation_time")
|
||||
if os.path.exists(cache_path) and \
|
||||
os.stat(__file__).st_mtime > os.stat(timestamp_path).st_mtime:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue