aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevan Franchini <twitch153@gentoo.org>2015-08-27 21:33:19 -0400
committerDevan Franchini <twitch153@gentoo.org>2015-08-27 21:47:11 -0400
commita84d2c42eda377be883b889fbe3d094ecc48221e (patch)
tree68c28001e9eb9d833d8f1df5dde06ca598fd81f7
parentutils.py: Gives create_overlay_dict a well needed updating (diff)
downloadlayman-a84d2c42eda377be883b889fbe3d094ecc48221e.tar.gz
layman-a84d2c42eda377be883b889fbe3d094ecc48221e.tar.bz2
layman-a84d2c42eda377be883b889fbe3d094ecc48221e.zip
maker.py: Adds multiple owner user query
-rw-r--r--layman/maker.py20
1 files 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('')