Rembg is a tool to remove images background
refactoring
Daniel Gatisdc45a477b2b7
diff --git a/rembg/commands/s_command.py b/rembg/commands/s_command.pyindex ac015b8..fa1cb8d 100644--- a/rembg/commands/s_command.py+++ b/rembg/commands/s_command.py@@ -175,10 +175,11 @@ def s_command(port: int, log_level: str, threads: int) -> None:def im_without_bg(content: bytes, commons: CommonQueryParams) -> Response:kwargs = dict()- try:- kwargs.update(json.loads(commons.extras))- except Exception:- pass+ if commons.extras:+ try:+ kwargs.update(json.loads(commons.extras))+ except Exception:+ passreturn Response(remove(