From 66d02caeaff7b83acfa09b21e25f4e518e62766f Mon Sep 17 00:00:00 2001 From: verycarefully Date: Mon, 8 Aug 2016 12:25:41 -0400 Subject: [PATCH] Fix lint warnings. --- code/client/munkilib/gurl.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/client/munkilib/gurl.py b/code/client/munkilib/gurl.py index 07c742bf..fb39e366 100644 --- a/code/client/munkilib/gurl.py +++ b/code/client/munkilib/gurl.py @@ -250,10 +250,10 @@ class Gurl(NSObject): NSURLSessionConfiguration.defaultSessionConfiguration() # (optional) set connections to ignore system proxies - if self.ignore_system_proxy == True: - configuration.setConnectionProxyDictionary_( - { kCFNetworkProxiesHTTPEnable: False, - kCFNetworkProxiesHTTPSEnable: False }) + if self.ignore_system_proxy is True: + configuration.setConnectionProxyDictionary_( + {kCFNetworkProxiesHTTPEnable: False, + kCFNetworkProxiesHTTPSEnable: False}) # set minumum supported TLS protocol (defaults to TLS1) configuration.setTLSMinimumSupportedProtocol_( @@ -477,7 +477,7 @@ class Gurl(NSObject): def handleRedirect_newRequest_withCompletionHandler_( self, response, request, completionHandler): '''Handle the redirect request''' - if response == None: + if response is None: # the request has changed the NSURLRequest in order to standardize # its format, for example, changing a request for # http://www.apple.com to http://www.apple.com/. This occurs because @@ -504,7 +504,7 @@ class Gurl(NSObject): newParsedURL = urlparse(newURL) # This code was largely based on the work of Andreas Fuchs # (https://github.com/munki/munki/pull/465) - if self.follow_redirects == True or self.follow_redirects == 'all': + if self.follow_redirects is True or self.follow_redirects == 'all': # Allow the redirect self.log('Allowing redirect to: %s' % newURL) if completionHandler: