Use "is None" instead of "== None"

This commit is contained in:
Guillaume Ayoub 2013-02-01 00:16:31 +01:00
parent 76ba2e8b6c
commit dd94660ef0

View File

@ -68,7 +68,7 @@ else:
def read_authorized(user, collection): def read_authorized(user, collection):
"""Check if the user is allowed to read the collection.""" """Check if the user is allowed to read the collection."""
if user == None: if user is None:
return False return False
elif owner_only.read_authorized(user, collection): elif owner_only.read_authorized(user, collection):
return True return True
@ -80,7 +80,7 @@ def read_authorized(user, collection):
def write_authorized(user, collection): def write_authorized(user, collection):
"""Check if the user is allowed to write the collection.""" """Check if the user is allowed to write the collection."""
if user == None: if user is None:
return False return False
elif owner_only.read_authorized(user, collection): elif owner_only.read_authorized(user, collection):
return True return True