Don't error when removing scope that does not exist
This commit is contained in:
parent
29d344e4c7
commit
de492e73d5
@ -442,7 +442,8 @@ def pop_scope(self):
|
|||||||
|
|
||||||
@_config_mutator
|
@_config_mutator
|
||||||
def remove_scope(self, scope_name):
|
def remove_scope(self, scope_name):
|
||||||
return self.scopes.pop(scope_name)
|
"""Remove scope by name; has no effect when ``scope_name`` does not exist"""
|
||||||
|
return self.scopes.pop(scope_name, None)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def file_scopes(self):
|
def file_scopes(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user