Skip to content

Commit

Permalink
Remove unnecessary arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
tomba committed Nov 2, 2024
1 parent 61f14aa commit 91b5b96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/gen-v4l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def replace(filename, replaces):
pat = r[0]
repl = r[1]

with open(filename, 'r', encoding='utf-8') as f:
with open(filename, encoding='utf-8') as f:
content = f.read()

content = re.sub(pat, repl, content, count=1, flags=re.MULTILINE)
Expand Down
2 changes: 1 addition & 1 deletion v4l2/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
__all__ = [ 'BufType', 'MemType' ]

def filepath_for_major_minor(major: int, minor: int):
with open(f'/sys/dev/char/{major}:{minor}/uevent', 'r', encoding='ascii') as f:
with open(f'/sys/dev/char/{major}:{minor}/uevent', encoding='ascii') as f:
for l in f.readlines():
if not l.startswith('DEVNAME='):
continue
Expand Down

0 comments on commit 91b5b96

Please sign in to comment.