Mod api/dockerclient.py to add exception