mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Move a default class definition into an else block so we're not redefining.
This commit is contained in:
parent
a4461ba158
commit
20616d50fc
@ -63,11 +63,6 @@ if sys.platform.startswith('linux'):
|
||||
pass
|
||||
|
||||
|
||||
class InotifyReloader():
|
||||
def __init__(self, callback=None):
|
||||
raise ImportError('You must have the inotify module installed to use '
|
||||
'the inotify reloader')
|
||||
|
||||
if has_inotify:
|
||||
|
||||
class InotifyReloader(threading.Thread):
|
||||
@ -118,6 +113,13 @@ if has_inotify:
|
||||
|
||||
self._callback(filename)
|
||||
|
||||
else:
|
||||
|
||||
class InotifyReloader(object):
|
||||
def __init__(self, callback=None):
|
||||
raise ImportError('You must have the inotify module installed to '
|
||||
'use the inotify reloader')
|
||||
|
||||
|
||||
preferred_reloader = InotifyReloader if has_inotify else Reloader
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user