~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to stop-loggerhead

  • Committer: Max Kanat-Alexander
  • Date: 2010-12-01 08:30:02 UTC
  • mto: (157.1.21 devel)
  • mto: This revision was merged to the branch mainline in revision 423.
  • Revision ID: mkanat@bugzilla.org-20101201083002-tum61bojpypc9a7b
Merge in a cherrypick of the "view" controller, to help performance on
Launchpad.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
default_pidfile = os.path.join(home, 'loggerhead.pid')
24
24
parser = OptionParser(usage='usage: %prog [options]', version='%prog')
25
25
parser.add_option('-p', '--pidfile', dest="pidfile", default=default_pidfile,
26
 
                                  help="override pidfile location")
 
26
                  help="override pidfile location")
27
27
 
28
28
options, args = parser.parse_args()
29
29
if len(args) > 0:
30
 
        parser.error('No filename arguments are used, only options.')
 
30
    parser.error('No filename arguments are used, only options.')
31
31
 
32
32
try:
33
33
    f = open(options.pidfile, 'r')
34
34
except IOError, e:
35
 
    print 'Pid file %s not found.' % options.pidfile
 
35
    print 'Pid file %s not found.' % (options.pidfile,)
36
36
    sys.exit(1)
37
37
 
38
38
pid = int(f.readline())