Browse Source

Merge pull request #60 from ajschmidt8/regex-fix

Parse regex result as `int`
main
Sean Mathews 3 years ago
committed by GitHub
parent
commit
bd5762c796
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      alarmdecoder/zonetracking.py
  2. +1
    -1
      test/test_zonetracking.py

+ 1
- 1
alarmdecoder/zonetracking.py View File

@@ -189,7 +189,7 @@ class Zonetracker(object):
if match is None:
return

zone = match.group(1)
zone = int(match.group(1))

# Add new zones and clear expired ones.
if zone in self._zones_faulted:


+ 1
- 1
test/test_zonetracking.py View File

@@ -76,7 +76,7 @@ class TestZonetracking(TestCase):
msg = Message('[00000000000000100A--],0bf,[f707000600e5800c0c020000],"CHECK 1 "')
self._zonetracker.update(msg)

self.assertEqual(self._zonetracker._zones['1'].status, Zone.CHECK)
self.assertEqual(self._zonetracker._zones[1].status, Zone.CHECK)

def test_zone_restore_skip(self):
panel_messages = [


Loading…
Cancel
Save