Skip to content

Commit 39bc7cf

Browse files
committed
fix is none check logic
1 parent afb962f commit 39bc7cf

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

examples/timestamp_url.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,3 @@
2525
timestamp_url = create_timestamp_anti_leech_url(host, file_name, query_string, encrypt_key, deadline)
2626

2727
print(timestamp_url)
28-
29-
30-

qiniu/zone.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,16 @@ def get_bucket_hosts(self, ak, bucket):
8080
hosts[self.scheme].update({'up': []})
8181
hosts[self.scheme].update({'io': []})
8282

83-
if self.up_host != None:
83+
if self.up_host is not None:
8484
hosts[self.scheme]['up'].append(self.scheme + "://" + self.up_host)
8585

86-
if self.up_host_backup != None:
86+
if self.up_host_backup is not None:
8787
hosts[self.scheme]['up'].append(self.scheme + "://" + self.up_host_backup)
8888

89-
if self.io_host != None:
89+
if self.io_host is not None:
9090
hosts[self.scheme]['io'].append(self.scheme + "://" + self.io_host)
9191

92-
if len(hosts[self.scheme]) == 0 or self.io_host == None:
92+
if len(hosts[self.scheme]) == 0 or self.io_host is None:
9393
# print(hosts)
9494
hosts = compat.json.loads(self.bucket_hosts(ak, bucket))
9595
else:

0 commit comments

Comments
 (0)