Skip to content

Commit

Permalink
Open file in text mode
Browse files Browse the repository at this point in the history
If we open the file using bytes it generates the following error:
_csv.Error: iterator should return strings, not bytes (the file should
be opened in text mode)

Signed-off-by: Guillaume <[email protected]>
  • Loading branch information
gthvn1 committed May 6, 2024
1 parent 61b47e6 commit 1ca47b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/download_centos.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def main():
local_epel=os.path.abspath(args.local_epel)

srpms_to_rpms = {}
with open(args.centos_rpms_and_srpms, 'rb') as csvfile:
with open(args.centos_rpms_and_srpms, 'r') as csvfile:
for row in csv.reader(csvfile, delimiter=','):
if row[1] not in srpms_to_rpms:
srpms_to_rpms[row[1]] = []
Expand Down

0 comments on commit 1ca47b9

Please sign in to comment.