comparison piecrust/pathutil.py @ 1114:8af2ea1f5c34

tasks: Add new `tasks` command and infrastructure, with `mention` task. * The new command lets `chef` run tasks from a queue. * The webmention endpoint now adds a mention task. * Moved mention handling code to a task runner.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 22 Feb 2018 22:12:45 -0800
parents 3ceeca7bb71c
children 40a40305c4e1
comparison
equal deleted inserted replaced
1113:29c51b981c17 1114:8af2ea1f5c34
54 res.append(n) 54 res.append(n)
55 elif not matches and inverse: 55 elif not matches and inverse:
56 res.append(n) 56 res.append(n)
57 return res 57 return res
58 58
59
60 def ensure_dir(path, mode=0o755):
61 try:
62 os.makedirs(path, mode=mode, exist_ok=True)
63 except OSError:
64 pass