~thomir-deactivatedaccount/adt-continuous-deployer/trunk-fix-warning-message

« back to all changes in this revision

Viewing changes to reaper.py

Make reaper.py more explicit when there's nothing for it to do. [r=Celso Providelo]

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    parser.add_argument('identifier', metavar='IDENTIFIER')
41
41
    args = parser.parse_args()
42
42
 
43
 
    matching = glob.glob(
44
 
        os.path.join(args.base, '*{}'.format(args.identifier)))
 
43
    glob_pattern = os.path.join(args.base, '*{}'.format(args.identifier))
 
44
    matching = glob.glob(glob_pattern)
45
45
    if not matching:
 
46
        print("Nothing to do - no files matching pattern %r" % glob_pattern)
46
47
        # We are happy if it's already destroyed.
47
48
        return 0
48
49