Skip to content

Commit

Permalink
Port PyNetgear from external to requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Jul 20, 2015
1 parent 4edf538 commit 43cc362
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "homeassistant/external/pynetgear"]
path = homeassistant/external/pynetgear
url = https://github.com/balloob/pynetgear.git
[submodule "homeassistant/external/pywemo"]
path = homeassistant/external/pywemo
url = https://github.com/balloob/pywemo.git
Expand Down
17 changes: 3 additions & 14 deletions homeassistant/components/device_tracker/netgear.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
MIN_TIME_BETWEEN_SCANS = timedelta(seconds=5)

_LOGGER = logging.getLogger(__name__)
REQUIREMENTS = ['pynetgear>=0.1']


def get_scanner(hass, config):
Expand All @@ -64,21 +65,9 @@ class NetgearDeviceScanner(object):
""" This class queries a Netgear wireless router using the SOAP-API. """

def __init__(self, host, username, password):
self.last_results = []

try:
# Pylint does not play nice if not every folders has an __init__.py
# pylint: disable=no-name-in-module, import-error
import homeassistant.external.pynetgear.pynetgear as pynetgear
except ImportError:
_LOGGER.exception(
("Failed to import pynetgear. "
"Did you maybe not run `git submodule init` "
"and `git submodule update`?"))
import pynetgear

self.success_init = False

return
self.last_results = []

self._api = pynetgear.Netgear(host, username, password)
self.lock = threading.Lock()
Expand Down
1 change: 0 additions & 1 deletion homeassistant/external/pynetgear
Submodule pynetgear deleted from e946ec
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ PyMata==2.07a

# Mysensors
https://github.com/theolind/pymysensors/archive/master.zip#egg=pymysensors-0.1

# Netgear (device_tracker.netgear)
pynetgear>=0.1

0 comments on commit 43cc362

Please sign in to comment.