mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
tools: drop netifaces requirement from keyctl-proxy
This commit is contained in:
parent
132660c378
commit
f0152902fc
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
import binascii
|
||||
import sys
|
||||
import netifaces
|
||||
import Pyro4
|
||||
import serpent
|
||||
|
||||
@ -66,12 +65,11 @@ class KeyctlProxy(object):
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) > 1:
|
||||
iface = sys.argv[1]
|
||||
ipaddr = sys.argv[1]
|
||||
else:
|
||||
print('Usage: keyctl-proxy interface')
|
||||
print('Usage: keyctl-proxy ipaddress')
|
||||
sys.exit(1)
|
||||
host = netifaces.ifaddresses(iface)[netifaces.AF_INET][0]['addr']
|
||||
daemon = Pyro4.Daemon(host=host, port=PORT)
|
||||
daemon = Pyro4.Daemon(host=ipaddr, port=PORT)
|
||||
proxy = KeyctlProxy()
|
||||
uri = daemon.register(proxy, 'keyctl')
|
||||
print('keyctl-proxy running at URI: "%s"' % uri)
|
||||
|
Loading…
Reference in New Issue
Block a user