diff options
author | Apprentice Harper <[email protected]> | 2021-04-11 14:05:09 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-04-11 14:05:09 +0100 |
commit | 874a6b8de99493cb4fb5dca0b0d433b47f2d4df6 (patch) | |
tree | 766a8be7a9c83b2000d9e47d6369841123c1ab20 /Obok_plugin | |
parent | 01c654cb6865fbf3c274d9ef76b6a300e9e76dc4 (diff) | |
parent | ecc7db09a9e3bda6da79b52bc7a07d5d217fd0ce (diff) |
Merge pull request #1575 from journeyman88/master
Fix in keyfetch for obok on win10
Diffstat (limited to 'Obok_plugin')
-rw-r--r-- | Obok_plugin/obok/obok.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Obok_plugin/obok/obok.py b/Obok_plugin/obok/obok.py index 6c43089..a00003b 100644 --- a/Obok_plugin/obok/obok.py +++ b/Obok_plugin/obok/obok.py @@ -470,8 +470,8 @@ class KoboLibrary(object): """The list of all MAC addresses on this machine.""" macaddrs = [] if sys.platform.startswith('win'): - c = re.compile('\s(' + '[0-9a-f]{2}-' * 5 + '[0-9a-f]{2})(\s|$)', re.IGNORECASE) - output = subprocess.Popen('ipconfig /all', shell=True, stdout=subprocess.PIPE, text=True).stdout + c = re.compile('\s?(' + '[0-9a-f]{2}[:\-]' * 5 + '[0-9a-f]{2})(\s|$)', re.IGNORECASE) + output = subprocess.Popen('wmic nic where PhysicalAdapter=True get MACAddress', shell=True, stdout=subprocess.PIPE, text=True).stdout for line in output: m = c.search(line) if m: |