diff options
author | 2014-11-13 10:39:51 -0800 | |
---|---|---|
committer | 2014-11-13 10:39:51 -0800 | |
commit | 421b4ac4b2b572653ef9dab7fc5a0f87d5c3bb09 (patch) | |
tree | 59900614aa1ed9b8fd8370ee995b54fd23596574 | |
parent | maker.py: Whitespace cleanup (diff) | |
download | layman-421b4ac4b2b572653ef9dab7fc5a0f87d5c3bb09.tar.gz layman-421b4ac4b2b572653ef9dab7fc5a0f87d5c3bb09.tar.bz2 layman-421b4ac4b2b572653ef9dab7fc5a0f87d5c3bb09.zip |
maker.py: Skip the protocol verification if it failed to guess one
-rw-r--r-- | layman/maker.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/layman/maker.py b/layman/maker.py index c7d5139..3393d1b 100644 --- a/layman/maker.py +++ b/layman/maker.py @@ -348,9 +348,10 @@ class Interactive(object): sources.append(get_input(msg)) ovl_type = self.guess_overlay_type(sources[0]) - msg = 'Is %(type)s the correct overlay type?: '\ - % ({'type': ovl_type}) - correct = get_ans(msg) + if ovl_type: + msg = 'Is "%(type)s" the correct overlay type?: '\ + % ({'type': ovl_type}) + correct = get_ans(msg) while not ovl_type or not correct: msg = 'Please provide overlay type: ' ovl_type = self.check_overlay_type(\ @@ -368,9 +369,10 @@ class Interactive(object): sources.append(get_input('Define source URL: ')) ovl_type = self.guess_overlay_type(sources[0]) - msg = 'Is %(type)s the correct overlay type?: '\ - % ({'type': ovl_type}) - correct = get_ans(msg) + if ovl_type: + msg = 'Is %(type)s the correct overlay type?: '\ + % ({'type': ovl_type}) + correct = get_ans(msg) while not ovl_type or not correct: msg = 'Please provide overlay type: ' ovl_type = self.check_overlay_type(\ |