mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00

This commit updates all tests to enforce the Python3 executable. This is necessary because the `assertRegex` function we use was renamed to this name only in Python 3.2 [1] For reference: s;/usr/bin/env python;/usr/bin/env python3;g [1]: https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertRegex
19 lines
409 B
Python
19 lines
409 B
Python
#!/usr/bin/env python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
|
import json
|
|
|
|
original_task = sys.stdin.readline()
|
|
modified_task = sys.stdin.readline()
|
|
|
|
task = json.loads(modified_task)
|
|
task["description"] = "This is an example modify hook"
|
|
|
|
# A random message
|
|
sys.stdout.write("Hello from the template hook\n")
|
|
|
|
sys.stdout.write(json.dumps(task, separators=(',', ':')) + '\n')
|
|
sys.exit(1)
|
|
|
|
# vim: ai sts=4 et sw=4
|