~ubuntu-branches/ubuntu/trusty/swift/trusty-updates

« back to all changes in this revision

Viewing changes to bin/swift-oldies

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-01-28 09:40:30 UTC
  • mfrom: (1.2.16)
  • Revision ID: package-import@ubuntu.com-20130128094030-aetz57x2qz9ye2d4
Tags: 1.7.6-0ubuntu1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
Lists old Swift processes.
14
14
        '''.strip())
15
15
    parser.add_option('-a', '--age', dest='hours', type='int', default=720,
16
 
        help='look for processes at least HOURS old; default: 720 (30 days)')
 
16
                      help='look for processes at least HOURS old; '
 
17
                      'default: 720 (30 days)')
17
18
    (options, args) = parser.parse_args()
18
19
 
19
20
    listing = []
27
28
            etime, pid, args = line.split(None, 2)
28
29
        except ValueError:
29
30
            sys.exit('Could not process ps line %r' % line)
30
 
        if (not args.startswith('/usr/bin/python /usr/bin/swift-') and
31
 
            not args.startswith('/usr/bin/python /usr/local/bin/swift-')):
 
31
        if not args.startswith('/usr/bin/python /usr/bin/swift-') and \
 
32
                not args.startswith('/usr/bin/python /usr/local/bin/swift-'):
32
33
            continue
33
34
        args = args.split('-', 1)[1]
34
35
        etime = etime.split('-')