Movatterモバイル変換


[0]ホーム

URL:


Google Git
Sign in
chromium /chromium /src /refs/heads/main /. /build /check_return_value.py
blob: 2337e962da1ed175e91a23d102f73664a0915e2a [file] [log] [blame]
Takuto Ikuta3dab32e02023-01-12 18:52:00[diff] [blame]1#!/usr/bin/env python3
Avi Drissman73a09d12022-09-08 20:33:38[diff] [blame]2# Copyright 2014 The Chromium Authors
jochen@chromium.org1731cd42014-03-26 19:10:02[diff] [blame]3# Use of this source code is governed by a BSD-style license that can be
4# found in the LICENSE file.
5
6"""This program wraps an arbitrary command and prints "1" if the command ran
7successfully."""
8
Raul Tambre9e24293b2019-05-12 06:11:07[diff] [blame]9
jochen@chromium.org29c8539a2014-04-03 07:36:32[diff] [blame]10import os
jochen@chromium.org1731cd42014-03-26 19:10:02[diff] [blame]11import subprocess
12import sys
13
jochen@chromium.org29c8539a2014-04-03 07:36:32[diff] [blame]14devnull= open(os.devnull,'wb')
15ifnot subprocess.call(sys.argv[1:], stdout=devnull, stderr=devnull):
Raul Tambre9e24293b2019-05-12 06:11:07[diff] [blame]16print(1)
jochen@chromium.org1731cd42014-03-26 19:10:02[diff] [blame]17else:
Raul Tambre9e24293b2019-05-12 06:11:07[diff] [blame]18print(0)

[8]ページ先頭

©2009-2025 Movatter.jp