Bug 1424967: Fix remaining lint error in upload_symbols.py; r=ted.mielczarek
MozReview-Commit-ID: LsvBXNy1SA6
--- a/toolkit/crashreporter/tools/upload_symbols.py
+++ b/toolkit/crashreporter/tools/upload_symbols.py
@@ -69,29 +69,29 @@ def main():
parser.add_argument('zip',
help='Symbols zip file - URL or path to local file')
args = parser.parse_args()
if not args.zip.startswith('http') and not os.path.isfile(args.zip):
log.error('Error: zip file "{0}" does not exist!'.format(args.zip))
return 1
-
secret_name = os.environ.get('SYMBOL_SECRET')
if secret_name is not None:
auth_token = get_taskcluster_secret(secret_name)
elif 'SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE' in os.environ:
token_file = os.environ['SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE']
if not os.path.isfile(token_file):
log.error('SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE "{0}" does not exist!'.format(token_file))
return 1
auth_token = open(token_file, 'r').read().strip()
else:
- log.error('You must set the SYMBOL_SECRET or SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE environment variables!')
+ log.error('You must set the SYMBOL_SECRET or SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE '
+ 'environment variables!')
return 1
# Allow overwriting of the upload url with an environmental variable
if 'SOCORRO_SYMBOL_UPLOAD_URL' in os.environ:
url = os.environ['SOCORRO_SYMBOL_UPLOAD_URL']
elif os.environ.get('MOZ_SCM_LEVEL', '1') == '1':
# Use the Tecken staging server for try uploads for now.
# This will eventually be changed in bug 1138617.
@@ -131,10 +131,11 @@ def main():
if r.status_code >= 200 and r.status_code < 300:
log.info('Uploaded successfully!')
return 0
print_error(r)
return 1
+
if __name__ == '__main__':
sys.exit(main())
--- a/tools/lint/flake8.yml
+++ b/tools/lint/flake8.yml
@@ -1,17 +1,17 @@
---
flake8:
description: Python linter
include:
+ - build/*.py
- build/moz.configure/*.configure
- - build/*.py
- - configure.py
- config/check_macroassembler_style.py
- config/mozunit.py
+ - configure.py
- layout/tools/reftest
- python/mach
- python/mach_commands.py
- python/mozboot
- python/mozbuild/mozpack/path.py
- python/mozlint
- python/mozterm
- python/mozversioncontrol
@@ -27,21 +27,22 @@ flake8:
- testing/mozharness/mozfile
- testing/mozharness/mozharness/mozilla/mar.py
- testing/mozharness/mozinfo
- testing/mozharness/scripts
- testing/remotecppunittests.py
- testing/runcppunittests.py
- testing/talos/
- testing/xpcshell
+ - toolkit/components/telemetry
+ - toolkit/crashreporter/tools/upload_symbols.py
- tools/git
- tools/lint
- tools/mach_commands.py
- tools/mercurial
- tools/tryselect
- - toolkit/components/telemetry
# Excludes should be added to topsrcdir/.flake8 due to a bug in flake8 where
# specifying --exclude causes custom configuration files to be ignored.
exclude: []
# The configure option is used by the build system
extensions: ['configure', 'py']
type: external
payload: python.flake8:lint