Code

- small performance optimisation for 'get': do common case first
[roundup.git] / roundup / scripts / roundup_admin.py
1 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
2 # This module is free software, and you may redistribute it and/or modify
3 # under the same terms as Python, so long as this copyright message and
4 # disclaimer are retained in their original form.
5 #
6 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
7 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
8 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE
9 # POSSIBILITY OF SUCH DAMAGE.
10 #
11 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
12 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
13 # FOR A PARTICULAR PURPOSE.  THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
16
17 # $Id: roundup_admin.py,v 1.6 2004-02-11 23:55:10 richard Exp $
19 """Command-line script stub that calls the roundup.admin functions.
20 """
21 __docformat__ = 'restructuredtext'
23 # python version check
24 from roundup import version_check
26 # import the admin tool guts and make it go
27 from roundup.admin import AdminTool
28 from roundup.i18n import _
30 import sys
32 def run():
33     # time out after a minute if we can
34     import socket
35     if hasattr(socket, 'setdefaulttimeout'):
36         socket.setdefaulttimeout(60)
37     tool = AdminTool()
38     sys.exit(tool.main())
40 if __name__ == '__main__':
41     run()
43 # vim: set filetype=python ts=4 sw=4 et si