Revision e2e10467
b/daemons/ganeti-confd | ||
---|---|---|
88 | 88 |
class ConfdInotifyEventHandler(pyinotify.ProcessEvent): |
89 | 89 |
|
90 | 90 |
def __init__(self, watch_manager, callback, |
91 |
file=constants.CLUSTER_CONF_FILE): |
|
91 |
filename=constants.CLUSTER_CONF_FILE):
|
|
92 | 92 |
"""Constructor for ConfdInotifyEventHandler |
93 | 93 |
|
94 | 94 |
@type watch_manager: L{pyinotify.WatchManager} |
95 | 95 |
@param watch_manager: ganeti-confd inotify watch manager |
96 | 96 |
@type callback: function accepting a boolean |
97 | 97 |
@param callback: function to call when an inotify event happens |
98 |
@type file: string |
|
99 |
@param file: config file to watch |
|
98 |
@type filename: string
|
|
99 |
@param filename: config file to watch
|
|
100 | 100 |
|
101 | 101 |
""" |
102 | 102 |
# no need to call the parent's constructor |
... | ... | |
104 | 104 |
self.callback = callback |
105 | 105 |
self.mask = pyinotify.EventsCodes.IN_IGNORED | \ |
106 | 106 |
pyinotify.EventsCodes.IN_MODIFY |
107 |
self.file = file |
|
107 |
self.file = filename
|
|
108 | 108 |
self.watch_handle = None |
109 | 109 |
|
110 | 110 |
def enable(self): |
Also available in: Unified diff