Closed cgwalters closed 7 years ago
That will be nasty. We need a mechanism to catch all self.d.* calls and check if self.d was initialized. Perhaps a class property for self.d?
http://stackoverflow.com/questions/15226721/python-class-member-lazy-initialization
@giuseppe With your code in AtomicClient could you change
def __init__(self):
self._dockerclient = get_docker_client()
To only allocate _dockerclient on first usenot when the AtomicDocker object is created?
@rhatdan I'll work on a fix for it
I have begun working on it, but it is not as easy as one would hope.
I have begun playing with it, and here is what I have so far:
https://github.com/projectatomic/atomic/compare/master...rhatdan:nodocker?expand=1
This is fixed in the master branch.
In general as the atomic command starts to wrap more commands, we shouldn't talk to all of them on init, only dynamically when necessary. This way if
docker.service
is down for some reason I can stillatomic host pkg-add gdb
or whatever to debug.