1
0
mirror of https://github.com/HorlogeSkynet/archey4 synced 2025-04-10 12:00:19 +02:00

Fixes bad field identifier for LAN IP addresses (#4)

This commit is contained in:
Samuel FORESTIER 2017-08-07 15:26:32 +02:00
parent d5f8316273
commit c04d74dd8e
No known key found for this signature in database
GPG Key ID: 4B6FA04B1AC95DD4

2
archey

@ -549,7 +549,7 @@ class LAN_IP:
except CalledProcessError:
# Slow manual workaround for old `inetutils` versions, with `ip`
self.value = ', '.join(check_output(['cut', '-d', ' ', '-f', '3'], stdin=Popen(['cut', '-d', '/', '-f', '2'], stdout=PIPE, stdin=Popen(['tr', '-s', ' '], stdout=PIPE, stdin=Popen(['grep', '-v', ' lo'], stdout=PIPE, stdin=Popen(['grep', 'inet '], stdout=PIPE, stdin=Popen(['ip', 'addr', 'show', 'up'], stdout=PIPE).stdout).stdout).stdout).stdout).stdout).decode().split()) or 'No Address'
self.value = ', '.join(check_output(['cut', '-d', ' ', '-f', '3'], stdin=Popen(['cut', '-d', '/', '-f', '1'], stdout=PIPE, stdin=Popen(['tr', '-s', ' '], stdout=PIPE, stdin=Popen(['grep', '-v', ' lo'], stdout=PIPE, stdin=Popen(['grep', 'inet '], stdout=PIPE, stdin=Popen(['ip', 'addr', 'show', 'up'], stdout=PIPE).stdout).stdout).stdout).stdout).stdout).decode().split()) or 'No Address'
class WAN_IP:
def __init__(self):