mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix SQL, remove unneeded imports.
This commit is contained in:
parent
653f360723
commit
21e06b9112
1 changed files with 3 additions and 4 deletions
|
@ -127,9 +127,7 @@ from __future__ import absolute_import
|
|||
# Import python libs
|
||||
from contextlib import contextmanager
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import datetime
|
||||
import logging
|
||||
|
||||
# Import salt libs
|
||||
|
@ -260,8 +258,9 @@ def event_return(events):
|
|||
tag = event.get('tag', '')
|
||||
data = event.get('data', '')
|
||||
sql = '''INSERT INTO salt_events (tag, data, master_id, alter_time)
|
||||
VALUES (%s, %s, %s, time.localtime())'''
|
||||
cur.execute(sql, (tag, psycopg2.extras.Json(data), __opts__['id']))
|
||||
VALUES (%s, %s, %s, %s)'''
|
||||
cur.execute(sql, (tag, psycopg2.extras.Json(data),
|
||||
__opts__['id'], time.localtime()))
|
||||
|
||||
|
||||
def save_load(jid, load):
|
||||
|
|
Loading…
Add table
Reference in a new issue