Merge pull request #130 from cuu/master

bluetooth GenNetworkList skip mac address
This commit is contained in:
GNU 2018-12-17 16:32:43 +08:00 committed by GitHub
commit 03d0e7cbe2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
import re
import pygame
#import math
import commands
@ -568,6 +568,10 @@ class BluetoothPage(Page):
if "Name" in self._Devices[v]:
if len(self._Devices[v]["Name"]) < 2:
continue
if re.match("[0-9a-f]{2}([-:]?)[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$", self._Devices[v]["Name"].lower()):
continue
else:
continue
ni = NetItem()
ni._Parent = self