瀏覽代碼

Remove obsolete if check

Oz N Tiram 8 年之前
父節點
當前提交
ce4526bdda
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      blogit/blogit.py

+ 4 - 6
blogit/blogit.py

@@ -355,14 +355,12 @@ def find_new_posts_and_pages(db):
             for collection in ['posts', 'pages']:
                 item = db[collection].get(Q.filename == _p)
                 if item:
+                    if new_mtime > item['mtime']:
+                        db[collection].update({'mtime': new_mtime},
+                                              eids=[item.eid])
+                        e = Entry(fullpath, eid=item.eid)
                     break
 
-            if item:
-                if new_mtime > item['mtime']:
-                    db[collection].update({'mtime': new_mtime},
-                                          eids=[item.eid])
-                    e = Entry(fullpath, eid=item.eid)
-
             if not item:
                 e = Entry(fullpath)
             if e: