def _infer_tarball_url():
try:<EOL><INDENT>with click.open_file('<STR_LIT>', '<STR_LIT:r>') as f:<EOL><INDENT>contents = f.read()<EOL><DEDENT>app_json = json.loads(contents)<EOL><DEDENT>except IOError:<EOL><INDENT>return None<EOL><DEDENT>repository = app_json.get('<STR_LIT>')<EOL>if not repository:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>return app_json.get('<STR_LIT>') + '<STR_LIT>'<EOL><DEDENT>
Returns the tarball URL inferred from an app.json, if present.