Remove 'global' statements
This commit is contained in:
parent
73c26903d1
commit
5fbf5c5530
@ -7,12 +7,10 @@ from mopidy.backends.spotify import SpotifyBackend
|
|||||||
|
|
||||||
logger = logging.getLogger('handler')
|
logger = logging.getLogger('handler')
|
||||||
|
|
||||||
global _request_handlers
|
|
||||||
_request_handlers = {}
|
_request_handlers = {}
|
||||||
|
|
||||||
def register(pattern):
|
def register(pattern):
|
||||||
def decorator(func):
|
def decorator(func):
|
||||||
global _request_handlers
|
|
||||||
if pattern in _request_handlers:
|
if pattern in _request_handlers:
|
||||||
raise ValueError(u'Tried to redefine handler for %s with %s' % (
|
raise ValueError(u'Tried to redefine handler for %s with %s' % (
|
||||||
pattern, func))
|
pattern, func))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user