mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Remove bad raise
This commit is contained in:
parent
16471cdfa0
commit
aadb4ecc90
@ -789,7 +789,6 @@ def shutdown_multiprocessing_logging_listener():
|
||||
try:
|
||||
# Sent None sentinel to stop the logging processing queue
|
||||
__MP_LOGGING_QUEUE.put(None)
|
||||
raise
|
||||
# Let's join the multiprocessing logging handle thread
|
||||
__MP_LOGGING_QUEUE_PROCESS.join(1)
|
||||
except IOError:
|
||||
|
@ -630,6 +630,21 @@ class Schema(six.with_metaclass(SchemaMeta, object)):
|
||||
serialized['additionalProperties'] = cls.__allow_additional_items__
|
||||
return serialized
|
||||
|
||||
@classmethod
|
||||
def defaults(cls):
|
||||
serialized = cls.serialize()
|
||||
defaults = {}
|
||||
for name, details in serialized['properties'].items():
|
||||
if 'default' in details:
|
||||
defaults[name] = details['default']
|
||||
continue
|
||||
if 'properties' in details:
|
||||
for sname, sdetails in details['properties'].items():
|
||||
if 'default' in sdetails:
|
||||
defaults.setdefault(name, {})[sname] = sdetails['default']
|
||||
continue
|
||||
return defaults
|
||||
|
||||
@classmethod
|
||||
def as_requirements_item(cls):
|
||||
serialized_schema = cls.serialize()
|
||||
|
Loading…
Reference in New Issue
Block a user