bat-serjo / PyIface

Python module to control network interfaces.
GNU General Public License v3.0
21 stars 10 forks source link

documentation glitch #1

Closed hjoukl closed 11 years ago

hjoukl commented 11 years ago

README has a little documentation glitch:

"

Get a specific interface by name

eth0 = PyIface.Interface('eth0')

" but

>>> pyiface.Interface("eth0").name
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyiface/iface.py", line 174, in __init__
self._name = self.name
File "pyiface/iface.py", line 226, in name
ifr.data.ifr_ifindex = self._index
TypeError: an integer is required
>>> 
>>> pyiface.Interface(name="eth0") # use named parameter
<pyiface.iface.Interface object at 0x7f510151dc50>
>>> pyiface.Interface(name="eth0").name
'eth0'
bat-serjo commented 11 years ago

This issue will be taken care of. Thank you for the note!