Skip to content

Commit

Permalink
Address suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Carlotta Sartore <[email protected]>
  • Loading branch information
flferretti and CarlottaSartore committed Dec 17, 2024
1 parent c53cd9e commit 4e76bca
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/rod/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ def main() -> None:

args = parser.parse_args()

log_level = "DEBUG" if args.verbose else "INFO"
log_level = logging.DEBUG if args.verbose else logging.INFO

logging.basicConfig(level=log_level)

from rod.urdf.exporter import UrdfExporter

# Ensure file argument is provided if output or `show` is specified.
if not args.file and (args.output or args.show):
parser.error("The following arguments are required: FILE.")
parser.error(
"The `--file` argument is required when using `--output` or `--show`."
)

# Show the file attributes if no output file is specified.
if args.file and not (args.output or args.show):
Expand Down

0 comments on commit 4e76bca

Please sign in to comment.