Skip to content

Commit

Permalink
fix resourcewarning
Browse files Browse the repository at this point in the history
  • Loading branch information
pd0wm committed May 15, 2020
1 parent a91d0fc commit 6c9a85c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rednose/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def write_code(folder, name, code, header):
def load_code(folder, name):
shared_fn = os.path.join(folder, f"lib{name}.so")
header_fn = os.path.join(folder, f"{name}.h")
header = open(header_fn).read()

with open(header_fn) as f:
header = f.read()

ffi = FFI()
ffi.cdef(header)
Expand Down

0 comments on commit 6c9a85c

Please sign in to comment.