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
3 changes: 1 addition & 2 deletions software/authbox/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@

from __future__ import print_function

import queue
import sys
import threading
import traceback
import types

from gpiozero import DigitalInputDevice

from authbox.compat import queue

# The line above simplifies imports for other modules that are already importing from api.

# TODO give each object a logger and use that instead of prints
Expand Down
3 changes: 2 additions & 1 deletion software/authbox/badgereader_wiegand_gpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@

from __future__ import division, print_function

import queue

from authbox.api import BaseWiegandPinThread
from authbox.compat import queue

DEFAULT_QUEUE_SIZE = 100 # more than enough for a scan
DEFAULT_TIMEOUT_IN_MS = 15
Expand Down
27 changes: 0 additions & 27 deletions software/authbox/compat.py

This file was deleted.

3 changes: 1 addition & 2 deletions software/authbox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
"""Config API for Authbox.

"""
import configparser
import os.path
import re

from authbox.compat import configparser

# TODO: This is very simplistic, supporting no escapes or indirect lookups
TEMPLATE_RE = re.compile(r"{((?!\d)\w+)}")
TIME_RE = re.compile(r"([\d.]+)([smhd])")
Expand Down
2 changes: 1 addition & 1 deletion software/authbox/gpio_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"""Abstraction for blinky buttons.
"""

import queue
import time

import gpiozero

from authbox.api import BasePinThread
from authbox.compat import queue


class Button(BasePinThread):
Expand Down
2 changes: 1 addition & 1 deletion software/authbox/gpio_buzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"""
from __future__ import print_function

import queue
import time

import gpiozero

from authbox.api import BasePinThread
from authbox.compat import queue

OFF = 0
ON = 1
Expand Down
2 changes: 1 addition & 1 deletion software/authbox/tests/test_badgereader_hid_keystroking.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

"""Tests for authbox.badgereader_hid_keystroking"""

import queue
import unittest

import authbox.badgereader_hid_keystroking
from authbox.compat import queue


class BadgereaderTest(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion software/authbox/tests/test_badgereader_wiegand_gpio.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

"""Tests for authbox.badgereader_wiegand_gpio"""

import queue
import threading
import time
import unittest

import authbox.badgereader_wiegand_gpio
from authbox.compat import queue

from . import setup_mock_pin_factory # noqa: F401

Expand Down
2 changes: 1 addition & 1 deletion software/authbox/tests/test_gpio_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

"""Tests for authbox.gpio_button"""

import queue
import unittest
from functools import partial

import authbox.gpio_button
from authbox import fake_gpio_for_testing
from authbox.compat import queue

from . import setup_mock_pin_factory # noqa: F401

Expand Down
2 changes: 1 addition & 1 deletion software/authbox/tests/test_gpio_buzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

"""Tests for authbox.gpio_buzzer"""

import queue
import unittest

import authbox.gpio_buzzer
from authbox import fake_gpio_for_testing
from authbox.compat import queue

from . import setup_mock_pin_factory # noqa: F401

Expand Down
2 changes: 1 addition & 1 deletion software/authbox/tests/test_gpio_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

"""Tests for authbox.gpio_relay"""

import queue
import unittest

import authbox.gpio_relay
from authbox import fake_gpio_for_testing
from authbox.compat import queue

from . import setup_mock_pin_factory # noqa: F401

Expand Down
2 changes: 1 addition & 1 deletion software/authbox/tests/test_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

"""Tests for authbox.timer"""

import queue
import unittest

import authbox.timer
from authbox.compat import queue

from . import setup_mock_pin_factory # noqa: F401

Expand Down
2 changes: 1 addition & 1 deletion software/authbox/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

from __future__ import print_function

import queue
import threading
import time

from authbox.api import BaseDerivedThread
from authbox.compat import queue


class Timer(BaseDerivedThread):
Expand Down
Loading