소스 검색

Remove redundant check

Oz N Tiram 8 년 전
부모
커밋
aceb7f5acd
1개의 변경된 파일9개의 추가작업 그리고 10개의 파일을 삭제
  1. 9 10
      blogit/blogit.py

+ 9 - 10
blogit/blogit.py

@@ -303,16 +303,15 @@ class Entry(object):
         self.id = _id
 
     def render(self):
-        if self.header.get('public', '').lower() in ['true', 'yes']:
-            try:
-                context = GLOBAL_TEMPLATE_CONTEXT.copy()
-                context['entry'] = self
-                _render(context, self.header.get('template', 'entry.html'),
-                        self.header.get('template', self.destination))
-                return True
-            except Exception:  # pragma: no cover
-                logger.exception("Found some problem with %s", self.path)
-                sys.exit(1)
+        try:
+            context = GLOBAL_TEMPLATE_CONTEXT.copy()
+            context['entry'] = self
+            _render(context, self.header.get('template', 'entry.html'),
+                    self.header.get('template', self.destination))
+            return True
+        except Exception:  # pragma: no cover
+            logger.exception("Found some problem with %s", self.path)
+            sys.exit(1)
 
 
 def _render(context, template_path, output_path, encoding='utf-8'):