From 29718d94a9019b388b47e6b4844a0e0ff3779c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Thu, 4 Apr 2013 01:48:05 +0200 Subject: [PATCH] fix setup for version consistency check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- setup.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index 497988cc..7281cc9c 100755 --- a/setup.py +++ b/setup.py @@ -262,14 +262,15 @@ class Setup(): elif opts.opts['--freedom'][0].lower() in ('partial', 'sloppy', 'false', 'no'): self.free = False if self.free is None: - print('') - print('You need to select your freedom, add --freedom=strict or --freedom=partial.') - print('') - print('--freedom=strict will install only ponies that are completely free.') - print('--freedom=partial will install all ponies, even if they are not free.') - print('') - print('') - exit(255) + if (opts.opts['--version'] is None) and ((len(opts.files) != 1) or (opts.files[0] != 'version')): + print('') + print('You need to select your freedom, add --freedom=strict or --freedom=partial.') + print('') + print('--freedom=strict will install only ponies that are completely free.') + print('--freedom=partial will install all ponies, even if they are not free.') + print('') + print('') + exit(255) if (opts.opts['---DESTDIR'] is not None) and (opts.opts['--dest-dir'] is None):