This pull request will (hopefully) address #200. The core issue was that I had a bad design that looked like this:
instantiate client based on environment variables (e.g., is there a database? a client name?)
create the parser for the user based on that client
based on the command (pull, push) import a main function to run it
in the main function import the client again, taking into account the image uri (e.g., s3:// should re-import and use Amazon S3 client)
What seems to be happening (and likely due to the messiness of the above) is that it was switching between 3 states of client, and it for some reason never got to s3. I've been unhappy with this design since I created it, so I thought now would be a good time to fix it up. The fixed design looks like this:
create the parser for the user with all possible commands
based on the command (pull, push) import a main function to run it
in the main function instantiate the client for the first (and final) time, taking into account environment and an image URI simultaneously. If the client doesn't have the function implemented, just tell the user and exit.
The main change to fix this was, instead of instantiating the client in sregistry.main, I removed that entirely and the functions import "get_client" and then use it when appropriate.
Additionally, I went through and updated many "bot.error" messages followed by "sys.exit" to just be "bot.exit" and updated docs.
This pull request will (hopefully) address #200. The core issue was that I had a bad design that looked like this:
What seems to be happening (and likely due to the messiness of the above) is that it was switching between 3 states of client, and it for some reason never got to s3. I've been unhappy with this design since I created it, so I thought now would be a good time to fix it up. The fixed design looks like this:
The main change to fix this was, instead of instantiating the client in sregistry.main, I removed that entirely and the functions import "get_client" and then use it when appropriate.
Additionally, I went through and updated many "bot.error" messages followed by "sys.exit" to just be "bot.exit" and updated docs.