Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Commit

Permalink
Fixes formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscoCanas committed Nov 18, 2014
1 parent c1772a4 commit fa33a7c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
10 changes: 4 additions & 6 deletions src/freeseer/framework/config/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,10 @@ def presentation(self, value):

def schema(self):
"""Returns the json schema for an Option."""
return {
'type': self.schema_type
} if self.default == self.NotSpecified else {
'type': self.schema_type,
'default': self.default,
}
schema = {'type': self.schema_type}
if self.default != self.NotSpecified:
schema['default'] = self.default
return schema

# Override these!

Expand Down
10 changes: 4 additions & 6 deletions src/freeseer/framework/config/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ def decode(self, value):
raise InvalidDecodeValueError(value)

def schema(self):
return {
'enum': self.choices
} if self.default == Option.NotSpecified else {
'enum': self.choices,
'default': self.default,
}
schema = {'enum': self.choices}
if self.default != Option.NotSpecified:
schema['default'] = self.default
return schema
24 changes: 12 additions & 12 deletions src/freeseer/tests/framework/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,51 +74,51 @@ def test_schema(self):
},
'auto_hide': {
'default': False,
'type': 'boolean'
'type': 'boolean',
},
'enable_audio_recording': {
'default': True,
'type': 'boolean'
'type': 'boolean',
},
'enable_video_recording': {
'default': True,
'type': 'boolean'
'type': 'boolean',
},
'videomixer': {
'default': 'Video Passthrough',
'type': 'string'
'type': 'string',
},
'audiomixer': {
'default': 'Audio Passthrough',
'type': 'string'
'type': 'string',
},
'record_to_file': {
'default': True,
'type': 'boolean'
'type': 'boolean',
},
'record_to_file_plugin': {
'default': 'Ogg Output',
'type': 'string'
'type': 'string',
},
'record_to_stream': {
'default': False,
'type': 'boolean'
'type': 'boolean',
},
'record_to_stream_plugin': {
'default': 'RTMP Streaming',
'type': 'string'
'type': 'string',
},
'audio_feedback': {
'default': False,
'type': 'boolean'
'type': 'boolean',
},
'video_preview': {
'default': True,
'type': 'boolean'
'type': 'boolean',
},
'default_language': {
'default': 'tr_en_US.qm',
'type': 'string'
'type': 'string',
},
},
}
Expand Down

0 comments on commit fa33a7c

Please sign in to comment.