Handle both versions of chfn office phone parameters (LP: #1699285)
This commit is contained in:
parent
30695532f9
commit
37671fddb5
|
@ -612,8 +612,15 @@ class MugshotWindow(Window):
|
||||||
success = False
|
success = False
|
||||||
|
|
||||||
logger.debug('Updating Office Phone...')
|
logger.debug('Updating Office Phone...')
|
||||||
command = "%s -w \"%s\" %s" % (chfn, office_phone, username)
|
|
||||||
if self.process_terminal_password(command, password):
|
# chfn 2.29 uses "-p" as parameter for changing the office-phone (LP: #1699285)
|
||||||
|
p_command = "%s -p \"%s\" %s" % (chfn, office_phone, username)
|
||||||
|
|
||||||
|
# other (newer, older?) use "-w"
|
||||||
|
w_command = "%s -w \"%s\" %s" % (chfn, office_phone, username)
|
||||||
|
|
||||||
|
if self.process_terminal_password(p_command, password) or \
|
||||||
|
self.process_terminal_password(w_command, password):
|
||||||
self.office_phone = office_phone
|
self.office_phone = office_phone
|
||||||
else:
|
else:
|
||||||
success = False
|
success = False
|
||||||
|
|
|
@ -8,7 +8,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2018-08-06 06:00-0400\n"
|
"POT-Creation-Date: 2018-08-06 06:10-0400\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
@ -141,11 +141,11 @@ msgid ""
|
||||||
"to your personal information."
|
"to your personal information."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../mugshot/MugshotWindow.py:822
|
#: ../mugshot/MugshotWindow.py:829
|
||||||
msgid "Update LibreOffice user details?"
|
msgid "Update LibreOffice user details?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ../mugshot/MugshotWindow.py:823
|
#: ../mugshot/MugshotWindow.py:830
|
||||||
msgid "Would you also like to update your user details in LibreOffice?"
|
msgid "Would you also like to update your user details in LibreOffice?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue