Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_unicode_builder(tmpdir):
from lektor.project import Project
from lektor.environment import Environment
from lektor.db import Database
from lektor.builder import Builder
proj = Project.from_path(os.path.join(os.path.dirname(__file__),
u'ünicöde-project'))
env = Environment(proj)
pad = Database(env).new_pad()
return pad, Builder(pad, str(tmpdir.mkdir('output')))
def theme_pad(theme_env):
from lektor.db import Database
return Database(theme_env).new_pad()
def build(self, update_source_info_first=False):
try:
db = Database(self.env)
builder = Builder(db.new_pad(), self.output_path,
extra_flags=self.extra_flags)
if update_source_info_first:
builder.update_all_source_infos()
builder.build_all()
if self.prune:
builder.prune()
except Exception:
traceback.print_exc()
else:
self.last_build = time.time()
def get_pad(self):
return Database(self.env).new_pad()
def get_pad(self):
return Database(self.env).new_pad()
def build(self, update_source_info_first=False):
try:
db = Database(self.env)
builder = Builder(db.new_pad(), self.output_path,
build_flags=self.build_flags)
if update_source_info_first:
builder.update_all_source_infos()
builder.build_all()
builder.prune()
except Exception:
traceback.print_exc()
else:
self.last_build = time.time()
def build(self, update_source_info_first=False):
try:
db = Database(self.env)
builder = Builder(db.new_pad(), self.output_path,
extra_flags=self.extra_flags)
if update_source_info_first:
builder.update_all_source_infos()
builder.build_all()
if self.prune:
builder.prune()
except Exception:
traceback.print_exc()
else:
self.last_build = time.time()