Skip to content

Commit

Permalink
Add Sources.list comment support
Browse files Browse the repository at this point in the history
Add custom logger in simulation support
  • Loading branch information
Ludwig CRON committed Dec 3, 2020
1 parent 4191fff commit 7dbbcd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions common/read_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def source_tokenizer(buffer):
start_index = 0
is_blank_from_zero, previous, current = True, "", ""
ln = line.expandtabs(4)
idx_comment = ln.find("#")
ln = ln[:idx_comment] if idx_comment > -1 else ln
for pos, current in enumerate(ln):
# check for indentation
if current == " " and previous in ["", " "] and start_index == 0:
Expand Down
5 changes: 4 additions & 1 deletion envs/bin/run
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ if __name__ == "__main__":
parser.add_argument(
"-c", "--clean", help="clean working directory", action="store_true", default=False
)
parser.add_argument(
"-l", "--custom_log", help="use custom `log_*", action="store_true", default=False
)
parser.add_argument(
"-b",
"--batch",
Expand Down Expand Up @@ -198,7 +201,7 @@ if __name__ == "__main__":

# run a simulation
if args.sim:
type, files, params = prepare_task(type="sim")
type, files, params = prepare_task(type="sim", use_custom_logger=args.custom_log)
# load the simulator script
if type is SimType.DIGITAL:
tool_name = Config.tools.get("DIG_SIMULATOR")
Expand Down

0 comments on commit 7dbbcd1

Please sign in to comment.