Skip to content

Commit eb3f7e6

Browse files
committed
Ensure to add an init file
1 parent 9b04476 commit eb3f7e6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

generate_parameter_library_py/generate_parameter_library_py/generate_python_module.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ def run(output_file, yaml_file, validation_module=''):
4848
with open(output_file, 'w') as f:
4949
f.write(code)
5050

51+
# Put an __init__.py file if one does not yet exist.
52+
init_file = os.path.join(os.path.dirname(output_file), '__init__.py')
53+
open(init_file, 'a').close()
5154

5255
def parse_args():
5356
parser = argparse.ArgumentParser()

0 commit comments

Comments
 (0)