Fix user details expansion (lp 1310634)

This commit is contained in:
Sean Davis 2014-04-22 22:47:27 -04:00
parent ed852b91a5
commit 1eea1e49d3
2 changed files with 8 additions and 3 deletions

View File

@ -243,8 +243,13 @@ class MugshotWindow(Window):
for line in open('/etc/passwd', 'r'):
if line.startswith(username + ':'):
logger.debug('Found details: %s' % line.strip())
details = line.split(':')[4]
name, office, office_phone, home_phone = details.split(',', 3)
details = line.split(':')[4].split(',', 3)
while len(details) < 4:
details.append("")
# Extract the user details
name, office, office_phone, home_phone = details
break
# Expand the user's fullname into first and last.

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-04 21:20-0400\n"
"POT-Creation-Date: 2014-04-22 06:13-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"