Opened 11 years ago

Closed 11 years ago

#150 closed (fixed)

Interface() string representation fails when a NetAddress() is defined with an IPv4 address but no network

Reported by: chaos@bbn.com Owned by: somebody
Priority: major Milestone:
Component: Clients Version:
Keywords: v1.2.1 Cc:
Dependencies:

Description

When i create a new NetAddress and give it only an IPv4 address and no network, the __init__() reports success, but NetAddress.__str__() fails with an exception something like:

  File "/home/chaos/gmoc_client/gmoc.py", line 413, in __str__
    recurse(self, 0, strings, seen)
  File "/home/chaos/gmoc_client/gmoc.py", line 397, in recurse
    recurse(element.__dict__, level + 4, strings, seen)
  File "/home/chaos/gmoc_client/gmoc.py", line 402, in recurse
    recurse(value, level + 4, strings, seen)
  File "/home/chaos/gmoc_client/gmoc.py", line 406, in recurse
    recurse(subelement, level + 4, strings, seen)
  File "/home/chaos/gmoc_client/gmoc.py", line 409, in recurse
    strings.append((" " * level) + "%s" % element)
  File "/home/chaos/gmoc_client/gmoc.py", line 1988, in __str__
    addr = self.addr.network
AttributeError: 'str' object has no attribute 'network'

Change History (1)

comment:1 Changed 11 years ago by chaos@bbn.com

Resolution: fixed
Status: newclosed

This is fixed in 1.2.2.

Note: See TracTickets for help on using tickets.