From 8507252b3a5f8d8f9a901af257de428783694581 Mon Sep 17 00:00:00 2001 From: Harmon Date: Tue, 2 Feb 2021 11:49:08 -0600 Subject: [PATCH] Simplify bind_api --- tweepy/binder.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tweepy/binder.py b/tweepy/binder.py index 2856058..671871c 100644 --- a/tweepy/binder.py +++ b/tweepy/binder.py @@ -194,17 +194,14 @@ def bind_api(*args, **kwargs): allowed_param = kwargs.pop('allowed_param', []) method.build_parameters(allowed_param, args, kwargs) try: - if kwargs.get('create'): - return method - else: - return method.execute( - api, http_method, path, headers=headers, - json_payload=json_payload, parser=parser, - payload_list=payload_list, payload_type=payload_type, - post_data=post_data, require_auth=require_auth, - return_cursors=return_cursors, upload_api=upload_api, - use_cache=use_cache - ) + return method.execute( + api, http_method, path, headers=headers, + json_payload=json_payload, parser=parser, + payload_list=payload_list, payload_type=payload_type, + post_data=post_data, require_auth=require_auth, + return_cursors=return_cursors, upload_api=upload_api, + use_cache=use_cache + ) finally: method.session.close() -- 2.25.1