]> git.phdru.name Git - phdru.name/cgi-bin/blog-ru/search-tags.git/commitdiff
Rename calc_tree to find_tags
authorOleg Broytman <phd@phdru.name>
Tue, 20 May 2014 06:00:48 +0000 (10:00 +0400)
committerOleg Broytman <phd@phdru.name>
Tue, 20 May 2014 06:00:48 +0000 (10:00 +0400)
search-tags.py
tags.py

index 27f14f0865f895f893349651784ff059b9114ba7..afdd6c47823cf0aef61b6429c945758dcca6a349 100755 (executable)
@@ -39,8 +39,8 @@ else:
         title = "Ошибка!"
         body = "Тег %s не существует!" % tag
     else: # Process tree
-        from tags import calc_tree
-        posts = calc_tree(tree)
+        from tags import find_tags
+        posts = find_tags(tree)
         status = None
         title = "Записи, найденные для выражения " + q
         if posts:
diff --git a/tags.py b/tags.py
index 35c4634ca53702fe4791bc70237fe13aa6018a2b..df64a1c286a7e645a84239c0d6571a7af46ee89d 100644 (file)
--- a/tags.py
+++ b/tags.py
@@ -43,7 +43,7 @@ def _test_post(post, tree):
     else:
         raise ValueError("Cannot get there")
 
-def calc_tree(tree):
+def find_tags(tree):
     _posts = []
     for (year, month, day), posts in blog_dict.iteritems():
         for post in posts: