12bde8e466a4451c7319e3a072d118917957d6554Steve Block#!/usr/bin/env python 22bde8e466a4451c7319e3a072d118917957d6554Steve Block# Copyright (c) 2011 Google Inc. All rights reserved. 32bde8e466a4451c7319e3a072d118917957d6554Steve Block# 42bde8e466a4451c7319e3a072d118917957d6554Steve Block# Redistribution and use in source and binary forms, with or without 52bde8e466a4451c7319e3a072d118917957d6554Steve Block# modification, are permitted provided that the following conditions are 62bde8e466a4451c7319e3a072d118917957d6554Steve Block# met: 72bde8e466a4451c7319e3a072d118917957d6554Steve Block# 82bde8e466a4451c7319e3a072d118917957d6554Steve Block# * Redistributions of source code must retain the above copyright 92bde8e466a4451c7319e3a072d118917957d6554Steve Block# notice, this list of conditions and the following disclaimer. 102bde8e466a4451c7319e3a072d118917957d6554Steve Block# * Redistributions in binary form must reproduce the above 112bde8e466a4451c7319e3a072d118917957d6554Steve Block# copyright notice, this list of conditions and the following disclaimer 122bde8e466a4451c7319e3a072d118917957d6554Steve Block# in the documentation and/or other materials provided with the 132bde8e466a4451c7319e3a072d118917957d6554Steve Block# distribution. 142bde8e466a4451c7319e3a072d118917957d6554Steve Block# * Neither the name of Google Inc. nor the names of its 152bde8e466a4451c7319e3a072d118917957d6554Steve Block# contributors may be used to endorse or promote products derived from 162bde8e466a4451c7319e3a072d118917957d6554Steve Block# this software without specific prior written permission. 172bde8e466a4451c7319e3a072d118917957d6554Steve Block# 182bde8e466a4451c7319e3a072d118917957d6554Steve Block# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 192bde8e466a4451c7319e3a072d118917957d6554Steve Block# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 202bde8e466a4451c7319e3a072d118917957d6554Steve Block# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 212bde8e466a4451c7319e3a072d118917957d6554Steve Block# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 222bde8e466a4451c7319e3a072d118917957d6554Steve Block# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 232bde8e466a4451c7319e3a072d118917957d6554Steve Block# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 242bde8e466a4451c7319e3a072d118917957d6554Steve Block# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 252bde8e466a4451c7319e3a072d118917957d6554Steve Block# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 262bde8e466a4451c7319e3a072d118917957d6554Steve Block# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 272bde8e466a4451c7319e3a072d118917957d6554Steve Block# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 282bde8e466a4451c7319e3a072d118917957d6554Steve Block# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 292bde8e466a4451c7319e3a072d118917957d6554Steve Block 302bde8e466a4451c7319e3a072d118917957d6554Steve Blockfrom __future__ import with_statement 312bde8e466a4451c7319e3a072d118917957d6554Steve Blockimport sys 322bde8e466a4451c7319e3a072d118917957d6554Steve Block 332bde8e466a4451c7319e3a072d118917957d6554Steve Blockfrom webkitpy.layout_tests import read_checksum_from_png 342bde8e466a4451c7319e3a072d118917957d6554Steve Block 352bde8e466a4451c7319e3a072d118917957d6554Steve Block 362bde8e466a4451c7319e3a072d118917957d6554Steve Blockif '__main__' == __name__: 372bde8e466a4451c7319e3a072d118917957d6554Steve Block for filename in sys.argv[1:]: 382bde8e466a4451c7319e3a072d118917957d6554Steve Block with open(filename, 'r') as filehandle: 392bde8e466a4451c7319e3a072d118917957d6554Steve Block print "%s: %s" % (read_checksum_from_png.read_checksum(filehandle), filename) 40