From 075cde20b4dbc9e43924a5b469a6bf3ddeb48d38 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sun, 26 May 2019 12:44:46 +0200 Subject: Move static_vars function to external file --- pyblog | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'pyblog') diff --git a/pyblog b/pyblog index 30103491..71dacf59 100755 --- a/pyblog +++ b/pyblog @@ -766,16 +766,8 @@ def generate_index_and_feed(): generate_sitemap(feed) -def static_vars(**kwargs): - def decorate(func): - for k in kwargs: - setattr(func, k, kwargs[k]) - return func - return decorate - - # exclude_list is only inialized once to avoid constant disk IO -@static_vars(exclude_list=None) +@utils.static_vars(exclude_list=None) def generate_blog(fresh=False, report_total_errors=True): """Generate the blog in BUILDDIR. -- cgit v1.2.1