From: Andrew W. Donoho Date: Thu, 16 Jan 2014 21:10:54 +0000 (-0600) Subject: Move the potentially uninitialized values out of the if test. X-Git-Tag: twitter-1.11.0~3^2~2^2~4 X-Git-Url: https://jfr.im/git/z_archive/twitter.git/commitdiff_plain/d908997bbf25f5d00f527a86d0c9e0240ef2960d?ds=sidebyside Move the potentially uninitialized values out of the if test. --- diff --git a/twitter/api.py b/twitter/api.py index ed6b99e..0e4377d 100644 --- a/twitter/api.py +++ b/twitter/api.py @@ -196,12 +196,12 @@ class TwitterCall(object): secure_str, self.domain, uri, dot, self.format) headers = {'Accept-Encoding': 'gzip'} if self.gzip else dict() + body = None; arg_data = None if self.auth: headers.update(self.auth.generate_headers()) arg_data = self.auth.encode_params(uriBase, method, kwargs) if method == 'GET': uriBase += '?' + arg_data - body = None else: body = arg_data.encode('utf8')