diff --git a/tgbot/kollagen-bot/main.py b/tgbot/kollagen-bot/main.py index ba3826f..a629dbc 100644 --- a/tgbot/kollagen-bot/main.py +++ b/tgbot/kollagen-bot/main.py @@ -128,25 +128,22 @@ class KollagenBot: num_images = ["-n", args.num_images] if args.num_images else [] with NamedTemporaryFile(suffix=".png") as ntf: - self.logger.debug( - f"Running: " - + str( - [ - self.kollagen_path, - "-r", - *directories, - "-w", - args.width, - "-h", - args.height, - *mode, - "-o", - ntf.name, - ] - ) - ) + shell_cmd_line = [ + self.kollagen_path, + "-r", + *directories, + "-w", + args.width, + "-h", + args.height, + *mode, + *num_images, + "-o", + ntf.name, + ] + self.logger.debug(f"Running: " + str(shell_cmd_line)) subprocess.run( - [self.kollagen_path, "-r", *directories, *mode, "-o", ntf.name], + shell_cmd_line, check=True, capture_output=True, )