Mercurial > piecrust2
comparison piecrust/admin/siteinfo.py @ 1105:68593928298d
internal: Remove unnecessary imports.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 18 Feb 2018 20:29:42 -0800 |
parents | 8101692fdc11 |
children | 8af2ea1f5c34 |
comparison
equal
deleted
inserted
replaced
1104:353c58ba596a | 1105:68593928298d |
---|---|
1 import os | 1 import os |
2 import os.path | 2 import os.path |
3 import sys | 3 import sys |
4 import copy | 4 import copy |
5 import logging | 5 import logging |
6 import threading | |
7 import subprocess | 6 import subprocess |
8 from flask import request, flash | 7 from flask import flash |
9 from piecrust import CACHE_DIR | 8 from piecrust import CACHE_DIR |
10 from piecrust.app import PieCrustFactory | 9 from piecrust.app import PieCrustFactory |
11 | 10 |
12 | 11 |
13 logger = logging.getLogger(__name__) | 12 logger = logging.getLogger(__name__) |
99 flash("Assets baked successfully!") | 98 flash("Assets baked successfully!") |
100 else: | 99 else: |
101 flash("Asset baking process returned '%s'... check the log." % | 100 flash("Asset baking process returned '%s'... check the log." % |
102 proc.returncode) | 101 proc.returncode) |
103 except subprocess.TimeoutExpired: | 102 except subprocess.TimeoutExpired: |
104 flash("Asset baking process is still running... check the log later.") | 103 flash("Asset baking process is still running... " |
104 "check the log later.") | |
105 | 105 |
106 def getPublishTargetLogFile(self, target): | 106 def getPublishTargetLogFile(self, target): |
107 target = target.replace(' ', '_').lower() | 107 target = target.replace(' ', '_').lower() |
108 return os.path.join(self.piecrust_app.cache_dir, | 108 return os.path.join(self.piecrust_app.cache_dir, |
109 'publish.%s.log' % target) | 109 'publish.%s.log' % target) |