Skip to content
Newer
Older
100755 37 lines (28 sloc) 833 Bytes
018d57a Merged Michael's changes with mine
Mihai Ibanescu authored
1 #!/usr/bin/python
2
643cf0d Unit tests pass again.
Michael DeHaan authored
3 """
4 Wrapper for cobbler
8500551 Added licensing and RH copyright. Pychecker (once again). Fixed one u…
Michael DeHaan authored
5
2c3463c Update copyrights as we've never required assignment.
mdehaan authored
6 Copyright 2006-2009, Red Hat, Inc and Others
3724392 Update mdehaan's email addr
mdehaan authored
7 Michael DeHaan <michael.dehaan AT gmail>
8500551 Added licensing and RH copyright. Pychecker (once again). Fixed one u…
Michael DeHaan authored
8
9 This software may be freely redistributed under the terms of the GNU
10 general public license.
11
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
643cf0d Unit tests pass again.
Michael DeHaan authored
15 """
16
909f301 More work on remoting the command line, "cobbler import (options)" no…
Michael DeHaan authored
17 import cobbler.cli as app
727bd96 Patch to make cobbler exit codes work as expected
Michael DeHaan authored
18 import sys
0fc5d88 Add profiling code (off by default to /usr/bin/cobbler)
Michael DeHaan authored
19
20 PROFILING = False
21
22 if PROFILING:
23 print "** PROFILING **"
24 import hotshot, hotshot.stats
25 prof = hotshot.Profile("cobbler.prof")
26 prof.runcall(app.main)
27 prof.close()
28 stats = hotshot.stats.load("cobbler.prof")
29 stats.strip_dirs()
30 stats.sort_stats('time')
31 print "** REPORT **"
32 stats.print_stats(100)
33 sys.exit(0)
34 else:
35 sys.exit(app.main())
018d57a Merged Michael's changes with mine
Mihai Ibanescu authored
36
Something went wrong with that request. Please try again.