#NEWLINE# def warn_for_links( name , service ) : #NEWLINE# #INDENT# links = service . get ( 'links' ) #NEWLINE# if links : #NEWLINE# #INDENT# example_service = links [ 0 ] . partition ( ':' ) [ 0 ] #NEWLINE# log . warn ( "Service {name} has links, which no longer create environment variables such as {example_service_upper}_PORT. If you are using those in your application code, you should instead connect directly to the hostname, e.g. '{example_service}'." . format ( name = name , example_service = example_service , example_service_upper = example_service . upper ( ) ) )