Skip to content

Commit

Permalink
fixes protocol_out argument
Browse files Browse the repository at this point in the history
  • Loading branch information
abestroka committed Nov 19, 2024
1 parent bc95058 commit 089da32
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions ot2_driver/protopiler/protopiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,24 +410,31 @@ def yaml_to_protocol(
returns the path to the protocol.py file as well as the resource file (if it does not exist, None)
"""
if protocol_out_path is None:
protocol_out_path = Path(
protocol_out = Path(
f"./protocol_{datetime.now().strftime('%Y%m%d-%H%M%S')}.py"
)

else:
protocol_out = Path(
str(protocol_out_path)
+ f"/protocol_{datetime.now().strftime('%Y%m%d-%H%M%S')}.py"
)

if not self.config:
self.load_config(config_path)

if resource_file and not self.resource_file:
self.load_config(self.config_path, resource_file)

if self.protocol_out_path is None:
protocol_out = Path(
f"./protocol_{datetime.now().strftime('%Y%m%d-%H%M%S')}.py"
)
else:
protocol_out = Path(
self.protocol_out_path
+ f"/protocol_{datetime.now().strftime('%Y%m%d-%H%M%S')}.py"
)
# if self.protocol_out_path is None:
# protocol_out = Path(
# f"./protocol_{datetime.now().strftime('%Y%m%d-%H%M%S')}.py"
# )
# else:
# protocol_out = Path(
# self.protocol_out_path
# + f"/protocol_{datetime.now().strftime('%Y%m%d-%H%M%S')}.py"
# )

protocol = []

Expand Down

0 comments on commit 089da32

Please sign in to comment.