sync drop dead code

This commit is contained in:
tmshv committed 2020-03-03 02:22:33 +03:00
1 parent 92b64808ea
commit 5610e50863
3 files changed
+1 -53

No files matched your search

+1 -8
View File
@@ -11,7 +11,7 @@ from db import collection
from sync.data import request
from sync.models import Model
from sync import create_date, images_from_html, title_from_html, create_post
from sync import create_date, title_from_html, create_post
from sync.models.Image import Image
from utils.hash import hash_str
from utils.io import parse_yaml_front_matter
@@ -174,9 +174,6 @@ class Page(Model):
files = []
files += self.get_param('images')
files += self.get_param('documents')
if self.has_param('contentFile'):
files += [self.get_param('contentFile')]
folder = self.get_param('folder')
files = [os.path.join(folder, x) for x in files]
files = sorted([self.file] + files)
@@ -201,8 +198,4 @@ def get_manifest(provider, path):
if 'id' in manifest:
manifest['id'] = str(manifest['id'])
if 'contentFile' in manifest:
dirname = os.path.dirname(path)
manifest['contentHtml'] = provider.read(os.path.join(dirname, manifest['contentFile'])).read().decode('utf-8')
return manifest