commit:     a84d2c42eda377be883b889fbe3d094ecc48221e
Author:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 28 01:33:19 2015 +0000
Commit:     Devan Franchini <twitch153 <AT> gentoo <DOT> org>
CommitDate: Fri Aug 28 01:47:11 2015 +0000
URL:        https://gitweb.gentoo.org/proj/layman.git/commit/?id=a84d2c42

maker.py: Adds multiple owner user query

 layman/maker.py | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/layman/maker.py b/layman/maker.py
index caf5655..06d624b 100644
--- a/layman/maker.py
+++ b/layman/maker.py
@@ -401,9 +401,25 @@ class Interactive(object):
         then appends the values to the overlay
         being created.
         '''
+        self.overlay['owner'] = []
         self.output.notice('')
-        self.overlay['owner_name'] = get_input('Define owner name: ')
-        self.overlay['owner_email'] = get_input('Define owner email: ')
+
+        msg = 'How many people own this overlay?: '
+        owner_amount = int(get_input(msg))
+
+        for i in range(1, owner_amount + 1):
+            owner = {}
+            extra = ''
+
+            if owner_amount > 1:
+                extra = '[%(i)s]\'s' % {'i': str(i)}
+
+            owner['name'] = get_input('Define owner%(extra)s name: '\
+                            % {'extra': extra})
+            owner['email'] = get_input('Define owner%(extra)s email: '\
+                             % {'extra': extra})
+            self.overlay['owner'].append(owner)
+
         self.output.notice('')
 
 

Reply via email to