Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds argument --out to online_report tool #40

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lobster/tools/core/online_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def main():
ap.add_argument("--repo-root",
help="override git repository root",
default=None)
ap.add_argument("--out",
help="output file, by default overwrite input",
default=None)
options = ap.parse_args()

if not os.path.isfile(options.lobster_report):
Expand Down Expand Up @@ -122,6 +125,7 @@ def main():

rel_path_from_root = os.path.relpath(item.location.filename,
repo_root)
# pylint: disable=possibly-used-before-assignment
actual_repo = gh_root
actual_sha = options.commit
actual_path = rel_path_from_root
Expand All @@ -140,9 +144,9 @@ def main():
line = item.location.line)
item.location = loc

report.write_report(options.lobster_report)
report.write_report(options.out if options.out else options.lobster_report)
print("LOBSTER report %s changed to use online references" %
options.lobster_report)
options.out if options.out else options.lobster_report)


if __name__ == "__main__":
Expand Down
1 change: 1 addition & 0 deletions lobster/tools/trlc/trlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ def main():
ok = False
if ok:
stab = sm.process()
# pylint: disable=possibly-used-before-assignment
if not ok or stab is None:
print("lobster-trlc: aborting due to earlier error")
return 1
Expand Down
Loading