Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError when accessing uninitialized resources #38

Closed
noxdafox opened this issue May 10, 2017 · 1 comment
Closed

AttributeError when accessing uninitialized resources #38

noxdafox opened this issue May 10, 2017 · 1 comment

Comments

@noxdafox
Copy link
Contributor

If the User will not generate a network or a storage pool and will try to access it he/she will get a misleading AttributeError.

Traceback (most recent call last):
  File "execute_sample.py", line 66, in <module>
    main()
  File "execute_sample.py", line 20, in main
    protocol(environment.context, arguments.sample, arguments.command)
  File "execute_sample.py", line 26, in protocol
    wait_for_ip_address(context, TIMEOUT)
  File "execute_sample.py", line 44, in wait_for_ip_address
    if context.ip4_address is not None:
  File "/usr/local/lib/python3.4/dist-packages/see/context/context.py", line 193, in ip4_address
    if self._ip4_address is None and self.network is not None:
  File "/usr/local/lib/python3.4/dist-packages/see/context/context.py", line 161, in network
    if self._resources.network.isActive():
AttributeError: 'NoneType' object has no attribute 'isActive'

As well, the Tutorial does not mention the network in the context.json file.

noxdafox added a commit to noxdafox/see that referenced this issue May 14, 2017
It is not the responsibility of the Context to check whether the
resources are active when accessing them.

This addresses issue WithSecureOpenSource#38.

Signed-off-by: Matteo Cafasso <noxdafox@gmail.com>
@noxdafox noxdafox mentioned this issue May 14, 2017
@noxdafox
Copy link
Contributor Author

fixed in 1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant