Skip to content

Commit 91b2e2b

Browse files
author
Yaison
committed
WS-2589: log warning if genre is present
1 parent 1c7f34c commit 91b2e2b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rosette/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,14 @@ class DocumentParameters(_DocumentParamSetBase):
153153
def __init__(self):
154154
"""Create a L{DocumentParameters} object."""
155155
_DocumentParamSetBase.__init__(
156-
self, ("content", "contentUri", "language", "profileId"))
156+
self, ("content", "contentUri", "genre", "language", "profileId"))
157157
self.file_name = ""
158158
self.use_multipart = False
159159

160160
def validate(self):
161161
"""Internal. Do not use."""
162+
if self["genre"] is not None:
163+
warnings.warn("genre is deprecated and will be removed in the next release.")
162164
if self["content"] is None:
163165
if self["contentUri"] is None:
164166
raise RosetteException(

0 commit comments

Comments
 (0)