diff --git a/plinth/modules/shadowsocks/forms.py b/plinth/modules/shadowsocks/forms.py index f6a2f1777..a09a13795 100644 --- a/plinth/modules/shadowsocks/forms.py +++ b/plinth/modules/shadowsocks/forms.py @@ -57,5 +57,5 @@ class ShadowsocksForm(ServiceForm): method = forms.ChoiceField( label=_('Method'), - choices=[(x, x) for x in METHODS], + choices=[(method, method) for method in METHODS], help_text=_('Encryption method. Must match setting on server.')) diff --git a/plinth/modules/shadowsocks/views.py b/plinth/modules/shadowsocks/views.py index e861e0443..1d44da139 100644 --- a/plinth/modules/shadowsocks/views.py +++ b/plinth/modules/shadowsocks/views.py @@ -61,10 +61,10 @@ class ShadowsocksServiceView(views.ServiceView): old_status = form.initial new_status = form.cleaned_data - if (old_status['server'] != new_status['server'] or - old_status['server_port'] != new_status['server_port'] or - old_status['password'] != new_status['password'] or - old_status['method'] != new_status['method']): + if old_status['server'] != new_status['server'] or \ + old_status['server_port'] != new_status['server_port'] or \ + old_status['password'] != new_status['password'] or \ + old_status['method'] != new_status['method']: new_config = { 'local_address': '::0', 'local_port': 1080,