Default answer is 'Y'.

This commit is contained in:
Cédric Bonhomme 2016-03-14 08:19:30 +01:00
parent eea4c4de8e
commit 40c1293df4
No known key found for this signature in database
GPG key ID: A1CB94DE57B7A70D
2 changed files with 4 additions and 4 deletions

View file

@ -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')

View file

@ -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')