Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ cache:
python:
- 2.6
- 2.7
- 3.2
- 3.3
- 3.4
- 3.6
Expand Down
4 changes: 2 additions & 2 deletions osquery/config_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
from __future__ import unicode_literals

from abc import ABCMeta, abstractmethod
from future.utils import with_metaclass

from osquery.extensions.ttypes import ExtensionResponse, ExtensionStatus
from osquery.plugin import BasePlugin

class ConfigPlugin(BasePlugin):
class ConfigPlugin(with_metaclass(ABCMeta, BasePlugin)):
"""All config plugins should inherit from ConfigPlugin"""
__metaclass__ = ABCMeta

def call(self, context):
"""Internal routing for this plugin type.
Expand Down
5 changes: 3 additions & 2 deletions osquery/logger_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
from __future__ import unicode_literals

from abc import ABCMeta, abstractmethod
from future.utils import with_metaclass

from osquery.extensions.ttypes import ExtensionResponse, ExtensionStatus
from osquery.plugin import BasePlugin

class LoggerPlugin(BasePlugin):

class LoggerPlugin(with_metaclass(ABCMeta, BasePlugin)):
"""All logger plugins should inherit from LoggerPlugin"""
__metaclass__ = ABCMeta

_use_glog_message = "Use Glog for status logging"
_invalid_action_message = "Not a valid logger plugin action"
Expand Down
3 changes: 1 addition & 2 deletions osquery/management.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import argparse
import logging
import os
import shutil
import socket
import subprocess
import sys
Expand Down Expand Up @@ -98,7 +97,7 @@ def open(self, timeout=2, interval=0.01):
try:
self.connection.open()
return
except:
except Exception:
time.sleep(interval)
delay += interval
self.instance.kill()
Expand Down
4 changes: 2 additions & 2 deletions osquery/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
from __future__ import unicode_literals

from abc import ABCMeta, abstractmethod
from future.utils import with_metaclass

from osquery.singleton import Singleton

class BasePlugin(Singleton):
class BasePlugin(with_metaclass(ABCMeta, Singleton)):
"""All osquery plugins should inherit from BasePlugin"""
__metaclass__ = ABCMeta

@abstractmethod
def call(self, context):
Expand Down
4 changes: 2 additions & 2 deletions osquery/table_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
from abc import ABCMeta, abstractmethod
from builtins import str
from collections import namedtuple
from future.utils import with_metaclass
import json
import logging

from osquery.extensions.ttypes import ExtensionResponse, ExtensionStatus
from osquery.plugin import BasePlugin

class TablePlugin(BasePlugin):
class TablePlugin(with_metaclass(ABCMeta, BasePlugin)):
"""All table plugins should inherit from TablePlugin"""
__metaclass__ = ABCMeta

_no_action_message = "Table plugins must include a request action"

Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def run(self):
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.6",
Expand Down