def _machine_check_connectivity():
with open(devnull, '<STR_LIT:w>') as devnull_f:<EOL><INDENT>try:<EOL><INDENT>status = subprocess.check_output(<EOL>['<STR_LIT>', '<STR_LIT:status>', '<STR_LIT>'],<EOL>stderr=devnull_f).strip()<EOL>if status == '<STR_LIT>':<EOL><INDENT>raise DatacatsError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if '<STR_LIT>' in _docker_kwargs:<EOL><INDENT>_docker_kwargs['<STR_LIT>'].assert_hostname = False<EOL><DEDENT><DEDENT>except subprocess.CalledProcessError:<EOL><INDENT>raise DatacatsError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT><DEDENT>
This method calls to docker-machine on the command line and
makes sure that it is up and ready.

Potential improvements to be made:
    - Support multiple machine names (run a `docker-machine ls` and then
    see which machines are active. Use a priority list)