Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some general fixes as the result of linting #134

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions flat-manager-client
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import time
import traceback
from argparse import ArgumentParser
from functools import reduce
from urllib.parse import urljoin, urlparse, urlsplit, urlunparse, urlunsplit
from urllib.parse import urljoin, urlparse, urlunparse

import aiohttp
import aiohttp.client_exceptions
Expand Down Expand Up @@ -423,7 +423,7 @@ async def wait_for_job(session, job_url, token):
if start_after and start_after > now:
print("Waiting %d seconds before starting job" % (int(start_after - now)))
if job_status > 0 and old_job_status == 0:
print("/ Job was started");
print("/ Job was started")
old_job_status = job_status
log = job['log']
if len(log) > 0:
Expand Down Expand Up @@ -527,7 +527,7 @@ async def commit_build(session, build_url, eol, eol_rebase, token_type, wait, to
"endoflife": eol,
"endoflife_rebase": eol_rebase
}
if token_type != None:
if token_type is not None:
json['token_type'] = token_type
resp = await session.post(build_url + "/commit", headers={'Authorization': 'Bearer ' + token}, json=json)
async with resp:
Expand All @@ -537,7 +537,7 @@ async def commit_build(session, build_url, eol, eol_rebase, token_type, wait, to
raise ApiError(resp, await resp.text())

job = await resp.json()
job_url = resp.headers['location'];
job_url = resp.headers['location']

if wait:
pass
Expand Down Expand Up @@ -588,11 +588,11 @@ async def publish_build(session, build_url, wait, token):
raise ApiError(resp, await resp.text())

job = await resp.json()
job_url = resp.headers['location'];
job_url = resp.headers['location']

if wait:
print("Waiting for publish job")
job = await wait_for_job(session, job_url, token);
job = await wait_for_job(session, job_url, token)

reparse_job_results(job)
job["location"] = job_url
Expand Down Expand Up @@ -770,7 +770,7 @@ async def push_command(session, args):
update_job_url = build_url_to_api(args.build_url) + "/job/" + str(update_job_id)
if args.wait_update:
print("Waiting for repo update job")
update_job = await wait_for_job(session, update_job_url, token);
update_job = await wait_for_job(session, update_job_url, token)
else:
update_job = await get_job(session, update_job_url, token)
reparse_job_results(update_job)
Expand All @@ -797,7 +797,7 @@ async def publish_command(session, args):
update_job_url = build_url_to_api(args.build_url) + "/job/" + str(update_job_id)
if args.wait_update:
print("Waiting for repo update job")
update_job = await wait_for_job(session, update_job_url, args.token);
update_job = await wait_for_job(session, update_job_url, args.token)
else:
update_job = await get_job(session, update_job_url, args.token)
reparse_job_results(update_job)
Expand Down
Loading