aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpyblog10
-rw-r--r--utils/utils.py8
2 files changed, 9 insertions, 9 deletions
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.
diff --git a/utils/utils.py b/utils/utils.py
index 1cabbdc8..44cf8e59 100644
--- a/utils/utils.py
+++ b/utils/utils.py
@@ -193,3 +193,11 @@ def postprocess_html_file(htmlfilepath):
htmlfileobj.seek(0)
htmlfileobj.write(str(soup))
htmlfileobj.truncate()
+
+
+def static_vars(**kwargs):
+ def decorate(func):
+ for k in kwargs:
+ setattr(func, k, kwargs[k])
+ return func
+ return decorate