Use Python whitespace conventions

This commit is contained in:
AJ Jordan 2018-12-09 01:42:46 -05:00
parent ce70209310
commit 529f5a1cd0
No known key found for this signature in database
GPG Key ID: A4FDB7BE12F63EC3
3 changed files with 6 additions and 6 deletions

View File

@ -16,9 +16,9 @@ repo = base.repos[reponame]
# Loosely based on write_raw_configfile() from DNF source code,
# because that method was introduced in DNF 2.0 but Qubes dom0 has DNF 1.x.
with open(repo.repofile) as fp:
ini = iniparse.INIConfig(fp)
ini = iniparse.INIConfig(fp)
ini[reponame]['enabled'] = 0
with open(repo.repofile, 'w') as fp:
fp.write(str(ini))
fp.write(str(ini))

View File

@ -16,9 +16,9 @@ repo = base.repos[reponame]
# Loosely based on write_raw_configfile() from DNF source code,
# because that method was introduced in DNF 2.0 but Qubes dom0 has DNF 1.x.
with open(repo.repofile) as fp:
ini = iniparse.INIConfig(fp)
ini = iniparse.INIConfig(fp)
ini[reponame]['enabled'] = 1
with open(repo.repofile, 'w') as fp:
fp.write(str(ini))
fp.write(str(ini))

View File

@ -7,5 +7,5 @@ base = dnf.Base()
base.read_all_repos()
for repo in base.repos.all():
l = [repo.id, repo.name, 'enabled' if repo.enabled else 'disabled']
print('\0'.join(l))
l = [repo.id, repo.name, 'enabled' if repo.enabled else 'disabled']
print('\0'.join(l))