Skip to content

Commit

Permalink
Iterate dictionaries directly
Browse files Browse the repository at this point in the history
Calling .keys() is redundant
  • Loading branch information
jrha committed Jul 17, 2024
1 parent 7f354bd commit 2f75dc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def update(self):
continue
else:
### Check if section has appended arch
for arch in ARCHS.keys():
for arch in ARCHS:
if section.endswith('-%s' % arch):
archlist = (arch,)
distname = section.split('-%s' % arch)[0]
Expand Down Expand Up @@ -1115,7 +1115,7 @@ def listrpmlinks(directory):

def main():
### Check availability of commands
for cmd in CONFIG.cmd.keys():
for cmd in CONFIG.cmd:
if not CONFIG.cmd[cmd]:
continue
cmdlist = CONFIG.cmd[cmd].split()
Expand Down

0 comments on commit 2f75dc6

Please sign in to comment.