File: on-modify-for-template.py

package info (click to toggle)
task 2.5.1%2Bdfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,576 kB
  • sloc: cpp: 36,161; python: 11,324; perl: 8,697; ansic: 7,400; sh: 673; makefile: 23
file content (19 lines) | stat: -rw-r--r-- 408 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
# -*- 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(0)

# vim: ai sts=4 et sw=4