diff --git a/actions/xmpp b/actions/xmpp index eadf8831f..10667b857 100755 --- a/actions/xmpp +++ b/actions/xmpp @@ -93,7 +93,7 @@ def parse_arguments(): def subcommand_pre_install(arguments): """Preseed debconf values before packages are installed.""" - domainname = arguments.domainname.strip("'") + domainname = arguments.domainname if not domainname: # If new domainname is blank, use hostname instead. domainname = socket.gethostname() @@ -157,7 +157,7 @@ def subcommand_change_hostname(arguments): def subcommand_change_domainname(arguments): """Update ejabberd and jwchat with new domainname""" - domainname = arguments.domainname.strip("'") + domainname = arguments.domainname if not domainname: # If new domainname is blank, use hostname instead. domainname = socket.gethostname() diff --git a/plinth/tests/test_actions.py b/plinth/tests/test_actions.py index 1cc70724c..85b139fb1 100644 --- a/plinth/tests/test_actions.py +++ b/plinth/tests/test_actions.py @@ -122,6 +122,7 @@ class TestPrivileged(unittest.TestCase): ('&', 'echo', 'hello'), (r'\;', 'echo' 'hello'), ('|', 'echo', 'hello'), + ('', 'echo', '', 'hello'), # Empty option argument tuple(r':;!&\/$%@`"~#*(){}[]|+=')) for options in option_lists: output = run('echo', options)