зеркало из https://github.com/mozilla/MozDef.git
Fix duo logpull state file
Signed-off-by: Brandon Myers <bmyers@mozilla.com>
This commit is contained in:
Родитель
42fc1784d5
Коммит
dc7437ca63
Двоичные данные
cron/duo_logpull.conf
Двоичные данные
cron/duo_logpull.conf
Двоичный файл не отображается.
|
@ -71,9 +71,8 @@ def process_events(mozmsg, duo_events, etype, state):
|
|||
|
||||
|
||||
def main():
|
||||
state_location = os.path.dirname(sys.argv[0]) + '/' + options.statepath
|
||||
try:
|
||||
state = pickle.load(open(state_location, 'rb'))
|
||||
state = pickle.load(open(options.statepath, 'rb'))
|
||||
except IOError:
|
||||
# Oh, you're new.
|
||||
state = {'administration': 0, 'authentication': 0, 'telephony': 0}
|
||||
|
@ -90,7 +89,7 @@ def main():
|
|||
state = process_events(mozmsg, duo.get_authentication_log(mintime=state['authentication']+1), 'authentication', state)
|
||||
state = process_events(mozmsg, duo.get_telephony_log(mintime=state['telephony']+1), 'telephony', state)
|
||||
|
||||
pickle.dump(state, open(state_location, 'wb'))
|
||||
pickle.dump(state, open(options.statepath, 'wb'))
|
||||
|
||||
|
||||
def initConfig():
|
||||
|
|
Загрузка…
Ссылка в новой задаче