comparison bin/telltreepkg.py @ 91:3ed079a7174a

Implement a way to stop a running treepackager.
author Bernhard Herzog <bh@intevation.de>
date Tue, 11 Sep 2007 17:24:56 +0000
parents
children 1fcdffbeb9de
comparison
equal deleted inserted replaced
90:6ed1c881ee1b 91:3ed079a7174a
1 #! /usr/bin/python2.4
2 # Copyright (C) 2007 by Intevation GmbH
3 # Authors:
4 # Bernhard Herzog <bh@intevation.de>
5 #
6 # This program is free software under the GPL (>=v2)
7 # Read the file COPYING coming with the software for details.
8
9 """Sends instructions to a running packager"""
10
11 import sys
12
13 import treepkgcmd
14 from treepkg.options import create_parser
15 from treepkg.readconfig import read_config
16 from treepkg.util import writefile
17
18 def main():
19 options, args = create_parser().parse_args()
20
21 if len(args) != 1:
22 print >>sys.stderr, "The command to send to treepkg must be given"
23 sys.exit(1)
24
25 treepkg_opts, packager_opts = read_config(options.config_file)
26
27 filename = treepkg_opts.get("instructions_file")
28 if filename:
29 writefile(filename, args[0])
30
31 main()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)