diff --git a/mopidy/config/default.conf b/mopidy/config/default.conf index 8d2101fb..d241323a 100644 --- a/mopidy/config/default.conf +++ b/mopidy/config/default.conf @@ -15,6 +15,6 @@ output = autoaudiosink [proxy] scheme = hostname = -port = +port = http username = password = diff --git a/mopidy/config/types.py b/mopidy/config/types.py index ba8b8f2a..8715c8da 100644 --- a/mopidy/config/types.py +++ b/mopidy/config/types.py @@ -227,10 +227,6 @@ class Port(Integer): minimum=0, maximum=2 ** 16 - 1, choices=choices) def deserialize(self, value): - # in case of no value is given, just return nothing - if not len(value): - return value - # now we can try to convert try: value = int(value) except ValueError: @@ -238,10 +234,10 @@ class Port(Integer): value = socket.getservbyname(value, 'tcp') except socket.error: raise ValueError('must be a valid port number') - else: - validators.validate_choice(value, self._choices) - validators.validate_minimum(value, self._minimum) - validators.validate_maximum(value, self._maximum) + + validators.validate_choice(value, self._choices) + validators.validate_minimum(value, self._minimum) + validators.validate_maximum(value, self._maximum) return value