Gentoo Archives: gentoo-commits

From: Devan Franchini <twitch153@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Fri, 28 Aug 2015 01:48:12
Message-Id: 1440726431.a84d2c42eda377be883b889fbe3d094ecc48221e.twitch153@gentoo
1 commit: a84d2c42eda377be883b889fbe3d094ecc48221e
2 Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 28 01:33:19 2015 +0000
4 Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 28 01:47:11 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/layman.git/commit/?id=a84d2c42
7
8 maker.py: Adds multiple owner user query
9
10 layman/maker.py | 20 ++++++++++++++++++--
11 1 file changed, 18 insertions(+), 2 deletions(-)
12
13 diff --git a/layman/maker.py b/layman/maker.py
14 index caf5655..06d624b 100644
15 --- a/layman/maker.py
16 +++ b/layman/maker.py
17 @@ -401,9 +401,25 @@ class Interactive(object):
18 then appends the values to the overlay
19 being created.
20 '''
21 + self.overlay['owner'] = []
22 self.output.notice('')
23 - self.overlay['owner_name'] = get_input('Define owner name: ')
24 - self.overlay['owner_email'] = get_input('Define owner email: ')
25 +
26 + msg = 'How many people own this overlay?: '
27 + owner_amount = int(get_input(msg))
28 +
29 + for i in range(1, owner_amount + 1):
30 + owner = {}
31 + extra = ''
32 +
33 + if owner_amount > 1:
34 + extra = '[%(i)s]\'s' % {'i': str(i)}
35 +
36 + owner['name'] = get_input('Define owner%(extra)s name: '\
37 + % {'extra': extra})
38 + owner['email'] = get_input('Define owner%(extra)s email: '\
39 + % {'extra': extra})
40 + self.overlay['owner'].append(owner)
41 +
42 self.output.notice('')