ソースを参照

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

Guillaume Ayoub 13 年 前
コミット
dd94660ef0
1 ファイル変更2 行追加2 行削除
  1. 2 2
      radicale/rights/from_file.py

+ 2 - 2
radicale/rights/from_file.py

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