Merge "Make indentation match the style guide."
This commit is contained in:
commit
d7f935a05b
@ -1,6 +1,19 @@
|
||||
#!/usr/bin/env python2
|
||||
# pylint: disable=bad-indentation
|
||||
# vim: set sw=2 ts=2:
|
||||
#
|
||||
# Copyright (C) 2015 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
import json
|
||||
import requests
|
||||
import termcolor
|
||||
@ -32,14 +45,15 @@ def handle_build_message():
|
||||
|
||||
print '{} #{} {}: {}'.format(name, number, status, full_url)
|
||||
|
||||
# bionic-lint is always broken, so we don't want to reject changes for those
|
||||
# failures until we clean things up.
|
||||
# bionic-lint is always broken, so we don't want to reject changes for
|
||||
# those failures until we clean things up.
|
||||
if name == 'bionic-presubmit':
|
||||
message_lines = ['{} #{} checkbuild {}: {}'.format(
|
||||
name, number, status, go_url)]
|
||||
if status == 'FAILURE':
|
||||
message_lines += ['If you believe this Verified-1 was in error, +1 the '
|
||||
'change and bionicbb will remove the -1 shortly.']
|
||||
message_lines += ['If you believe this Verified-1 was in error, '
|
||||
'+1 the change and bionicbb will remove the -1 '
|
||||
'shortly.']
|
||||
|
||||
request_data = {
|
||||
'message': '\n'.join(message_lines)
|
||||
|
@ -1,5 +1,18 @@
|
||||
# pylint: disable=bad-indentation
|
||||
# vim: set sw=2 ts=2:
|
||||
#
|
||||
# Copyright (C) 2015 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
import json
|
||||
import requests
|
||||
|
||||
|
@ -1,6 +1,19 @@
|
||||
#!/usr/bin/env python2
|
||||
# pylint: disable=bad-indentation
|
||||
# vim: set sw=2 ts=2:
|
||||
#
|
||||
# Copyright (C) 2015 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
import base64
|
||||
import httplib
|
||||
import httplib2
|
||||
@ -48,7 +61,8 @@ def build_service():
|
||||
STORAGE = Storage('oauth.storage')
|
||||
|
||||
# Start the OAuth flow to retrieve credentials
|
||||
flow = flow_from_clientsecrets(config.client_secret_file, scope=OAUTH_SCOPE)
|
||||
flow = flow_from_clientsecrets(config.client_secret_file,
|
||||
scope=OAUTH_SCOPE)
|
||||
http = httplib2.Http()
|
||||
|
||||
# Try to retrieve credentials from storage or run the flow to generate them
|
||||
@ -253,7 +267,8 @@ def process_message(msg, dry_run):
|
||||
body = get_body(msg)
|
||||
gerrit_info = get_gerrit_info(body)
|
||||
if not gerrit_info:
|
||||
print termcolor.colored('No info found: {}'.format(msg['id']), 'red')
|
||||
print termcolor.colored('No info found: {}'.format(msg['id']),
|
||||
'red')
|
||||
msg_type = gerrit_info['MessageType']
|
||||
handler = 'handle_{}'.format(gerrit_info['MessageType'])
|
||||
if handler in globals():
|
||||
|
@ -1,2 +0,0 @@
|
||||
[pep8]
|
||||
ignore = E111
|
Loading…
x
Reference in New Issue
Block a user