shadowsocks: Minor styling fixes

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2017-11-29 16:11:45 +05:30
parent 07ee92692b
commit 0a9c2667bf
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
2 changed files with 5 additions and 5 deletions

View File

@ -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.'))

View File

@ -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,