- if has_opened_temp_file_lists == False:
- content_path_file = open("/tmp/content_file_path.tmp", "w")
- content_name_file = open("/tmp/content_name_path.tmp", "w")
- has_opened_temp_file_lists = True
-
- if not content_path_cache.has_key(path):
- content_path_file.write("DEFAULT %s\n" % (path))
- content_path_cache[path] = 1
-
- if not content_name_cache.has_key(file):
- content_name_file.write("DEFAULT %s\n" % (file))
- content_name_cache[file] = 1
+ if path not in content_path_cache:
+ content_path_cache.add(path)
+
+ if file not in content_name_cache:
+ content_name_cache.add(file)
+