From 40c1293df4ad3a69286293c84d838e5834fdeb5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Mon, 14 Mar 2016 08:19:30 +0100 Subject: [PATCH] Default answer is 'Y'. --- stegano/slsb.py | 4 ++-- stegano/slsbset.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stegano/slsb.py b/stegano/slsb.py index 3919117..3abc086 100755 --- a/stegano/slsb.py +++ b/stegano/slsb.py @@ -44,8 +44,8 @@ def hide(input_image_file, message): if img.mode != 'RGB': print('The mode of the image is not RGB. Mode is {}'.format(img.mode)) - answer = input('Convert the image to RGB (Y / N) ?\n') - if answer == 'n': + answer = input('Convert the image to RGB ? [Y / n]\n') or 'Y' + if answer.lower() == 'n': raise Exception('Not a RGB image.') else: img = img.convert('RGB') diff --git a/stegano/slsbset.py b/stegano/slsbset.py index 81e19bd..1a76255 100644 --- a/stegano/slsbset.py +++ b/stegano/slsbset.py @@ -45,8 +45,8 @@ def hide(input_image_file, message, generator_function): if img.mode != 'RGB': print('The mode of the image is not RGB. Mode is {}'.format(img.mode)) - answer = input('Convert the image to RGB (Y / N) ?\n') - if answer == 'n': + answer = input('Convert the image to RGB ? [Y / n]\n') or 'Y' + if answer.lower() == 'n': raise Exception('Not a RGB image.') else: img = img.convert('RGB')