Commit ea8f09c3 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Make OutputFormatArgument.value a variable

The object was a property, although this served no purpose at all.
parent 998d7e25
......@@ -285,21 +285,16 @@ class OutputFormatArgument(ValueArgument):
def ___init__(self, *args, **kwargs):
super(OutputFormatArgument, self).___init__(*args, **kwargs)
self.value = None
@property
def value(self):
return getattr(self, '_value', None)
@value.setter
def value(self, newvalue):
if not newvalue:
return
elif newvalue.lower() in self.formats:
self._value = newvalue.lower()
self.value = newvalue.lower()
else:
raise CLIInvalidArgument(
'Invalid value %s for argument %s' % (
newvalue, self.lvalue),
'Invalid value %s for argument %s' % (newvalue, self.lvalue),
details=['Valid output formats: %s' % ', '.join(self.formats)])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment