diff options
| author | 2013-03-13 20:58:39 -0300 | |
|---|---|---|
| committer | 2013-03-13 20:58:39 -0300 | |
| commit | 1004b9f3c61574acbdb3ec2f303d35307949fb7e (patch) | |
| tree | 3ae41121a82650e6889fda82a4316f989dfc0b4b /extra_plugins | |
| parent | 1c7c74d71f5dc9d13d029c9df8d46f27907a7503 (diff) | |
| parent | 8b14a1e5b2ca574fdd4fd2377567ec98a110d4b6 (diff) | |
Merge tag 'upstream/5.4.2'
Upstream version 5.4.2
Diffstat (limited to 'extra_plugins')
| -rw-r--r-- | extra_plugins/command_planetoid/__init__.py | 22 | ||||
| -rw-r--r-- | extra_plugins/task_mustache/__init__.py | 3 |
2 files changed, 13 insertions, 12 deletions
diff --git a/extra_plugins/command_planetoid/__init__.py b/extra_plugins/command_planetoid/__init__.py index 7ccb19e..2428f10 100644 --- a/extra_plugins/command_planetoid/__init__.py +++ b/extra_plugins/command_planetoid/__init__.py @@ -23,7 +23,7 @@ # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -from __future__ import print_function +from __future__ import print_function, unicode_literals import codecs import datetime import hashlib @@ -86,7 +86,7 @@ class Planetoid(Command, Task): line = line.strip() if line.startswith("#"): continue - elif line.startswith(u'http'): + elif line.startswith('http'): feed = line elif line: name = line @@ -119,7 +119,7 @@ class Planetoid(Command, Task): elif list(f)[0].url != feed: yield { 'basename': self.name, - 'name': (u'updating_' + name).encode('utf8'), + 'name': ('updating_' + name).encode('utf8'), 'actions': ((update_feed_url, (list(f)[0], feed)), ), } @@ -224,18 +224,18 @@ class Planetoid(Command, Task): meta_path = os.path.join('posts', unique_id + '.meta') post_path = os.path.join('posts', unique_id + '.txt') with codecs.open(meta_path, 'wb+', 'utf8') as fd: - fd.write(u'%s\n' % entry.title.replace('\n', ' ')) - fd.write(u'%s\n' % unique_id) - fd.write(u'%s\n' % entry.date.strftime('%Y/%m/%d %H:%M')) - fd.write(u'\n') - fd.write(u'%s\n' % entry.link) + fd.write('%s\n' % entry.title.replace('\n', ' ')) + fd.write('%s\n' % unique_id) + fd.write('%s\n' % entry.date.strftime('%Y/%m/%d %H:%M')) + fd.write('\n') + fd.write('%s\n' % entry.link) with codecs.open(post_path, 'wb+', 'utf8') as fd: - fd.write(u'.. raw:: html\n\n') + fd.write('.. raw:: html\n\n') content = entry.content if not content: - content = u'Sin contenido' + content = 'Sin contenido' for line in content.splitlines(): - fd.write(u' %s\n' % line) + fd.write(' %s\n' % line) for entry in Entry.select().order_by(Entry.date.desc()): entry_id = gen_id(entry) diff --git a/extra_plugins/task_mustache/__init__.py b/extra_plugins/task_mustache/__init__.py index 0d0e87d..8b5ec13 100644 --- a/extra_plugins/task_mustache/__init__.py +++ b/extra_plugins/task_mustache/__init__.py @@ -73,7 +73,8 @@ class Mustache(Task): # Configuration for k, v in self.site.config.items(): - if isinstance(v, (str, unicode)): + # FIXME: not py3 ready + if isinstance(v, (str, unicode)): # NOQA data[k] = v # Tag data |
