Skip to content

Commit

Permalink
Added warning for using laser2 with a language
Browse files Browse the repository at this point in the history
  • Loading branch information
NIXBLACK11 authored Nov 19, 2023
1 parent 57adb73 commit b7d3d35
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions laser_encoders/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import os
import re
import sys
import warnings
from collections import namedtuple
from pathlib import Path

Expand Down Expand Up @@ -390,9 +391,7 @@ def __init__(
):

if laser == "laser2" and lang is not None:
print(
"Warning: The 'lang' parameter is optional when using 'laser2'. It will be ignored."
)
warnings.warn("Warning: The 'lang' parameter is optional when using 'laser2'. It will be ignored.")

if laser == "laser3" and lang is None:
raise ValueError("For 'laser3', the 'lang' parameter is required.")
Expand Down

0 comments on commit b7d3d35

Please sign in to comment.