From: Harmon Date: Tue, 2 Feb 2021 17:49:08 +0000 (-0600) Subject: Simplify bind_api X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8507252b3a5f8d8f9a901af257de428783694581;p=tweepy.git Simplify bind_api --- 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()