diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2021-04-21 15:18:51 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2021-04-22 11:47:19 +0300 |
commit | a71ce5aec750458bfd5fe14ca7ebc415620e568a (patch) | |
tree | a1b5225999bacc5e8bc08e6b7ee277e9bdc675ba | |
parent | 3e4df393188a659b40269581a75e697b1b0e8e25 (diff) |
replace unneccesary print(( with print(
Change-Id: Ib4948b9c1193d8ba2f732d09367ee7df813a562c
-rwxr-xr-x | gerrit/check_external_ids_oauth.py | 22 | ||||
-rwxr-xr-x | grok-check-manifest.py | 6 | ||||
-rwxr-xr-x | ssh_keys.py | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/gerrit/check_external_ids_oauth.py b/gerrit/check_external_ids_oauth.py index 2012ab2..e516b43 100755 --- a/gerrit/check_external_ids_oauth.py +++ b/gerrit/check_external_ids_oauth.py @@ -20,7 +20,7 @@ for dentry in os.walk('.'): try: account_id = conf.get(external_id, 'accountId') except: - print(("WARNING: {} has no account_id!".format(external_id))) + print("WARNING: {} has no account_id!".format(external_id)) account_id = None continue @@ -38,7 +38,7 @@ for dentry in os.walk('.'): if auth_type == "github-oauth": # a github-oauth absolutely has to have an account id if not account_id: - print(("ERROR: github-oauth without account id: {}".format(external_id))) + print("ERROR: github-oauth without account id: {}".format(external_id)) else: if not account_id in ids: ids[account_id] = {} @@ -53,13 +53,13 @@ for dentry in os.walk('.'): elif auth_type == "mailto": if email == None: - print(("WARN: no explicit mail set for mailto: {}".format(auth_target))) + print("WARN: no explicit mail set for mailto: {}".format(auth_target)) elif auth_target != email: - print(("WARN: mails don't match for mailto: {} email: {}".format(auth_target,email))) + print("WARN: mails don't match for mailto: {} email: {}".format(auth_target,email)) # a mailto absolutely has to have an account id if not account_id: - print(("ERROR: mailto without account id: {}".format(external_id))) + print("ERROR: mailto without account id: {}".format(external_id)) else: if not account_id in ids: ids[account_id] = {} @@ -72,7 +72,7 @@ for dentry in os.walk('.'): emails[auth_target]['mailto_id'] = auth_target elif auth_type == "username": if not account_id: - print(("ERROR: username without account id: {}".format(external_id))) + print("ERROR: username without account id: {}".format(external_id)) else: if not account_id in ids: ids[account_id] = {} @@ -86,7 +86,7 @@ for dentry in os.walk('.'): emails[email]['username_id'] = account_id else: - print(("WARN: unrecognized auth_type: {}".format(external_id))) + print("WARN: unrecognized auth_type: {}".format(external_id)) #print('{} - {} - {} ({})'.format(auth_type,auth_target, account_id,email)) @@ -96,17 +96,17 @@ for account in ids: # every account should have a username: externalId if not "username" in ids[account]: - print(("WARN: no username entry for account #{}".format(account))) + print("WARN: no username entry for account #{}".format(account)) # Look for "orphan" github-oauth entries that aren't tied to a 'username' if 'github' in ids: - print(("ERROR: github-oauth:{} has no correpsonding username entry".format(ids[account]['github']))) + print("ERROR: github-oauth:{} has no correpsonding username entry".format(ids[account]['github'])) # Look for "orphan" mailto entries that aren't tied to a 'username' if 'mailto' in ids: - print(("ERROR: mailto:{} has no correpsonding username entry".format(ids[account]['mailto']))) + print("ERROR: mailto:{} has no correpsonding username entry".format(ids[account]['mailto'])) else: # warn if the accountId for the 'username' entry differs from this accountId if 'username_id' in ids[account] and account != ids[account]['username_id']: - print(("ERROR: account {} is not equal to accountId {} for username:{}".format(account,ids[account]['username_id'],ids[account]['username']))) + print("ERROR: account {} is not equal to accountId {} for username:{}".format(account,ids[account]['username_id'],ids[account]['username'])) diff --git a/grok-check-manifest.py b/grok-check-manifest.py index a682db4..fec4b95 100755 --- a/grok-check-manifest.py +++ b/grok-check-manifest.py @@ -99,9 +99,9 @@ if __name__ == '__main__': to_add, to_del, to_sync = compare_manifests(local, remote) if to_add: - print(('Missing repos:\n %s' % '\n '.join(to_add))) + print('Missing repos:\n %s' % '\n '.join(to_add)) if to_del: - print(('Delete repos:\n %s' % '\n '.join(to_del))) + print('Delete repos:\n %s' % '\n '.join(to_del)) if to_sync: print('Repos out sync:') - print((' ' + '\n '.join(to_sync))) + print(' ' + '\n '.join(to_sync)) diff --git a/ssh_keys.py b/ssh_keys.py index 78ae37f..01cc645 100755 --- a/ssh_keys.py +++ b/ssh_keys.py @@ -48,7 +48,7 @@ def keys(user): keys = data.get(user) if keys: for key in keys: - print((key[1])) + print(key[1]) if __name__ == '__main__': |