mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Port pelican to python 3.
Stays compatible with 2.x series, thanks to an unified codebase.
This commit is contained in:
parent
9847394e12
commit
71995d5e1b
43 changed files with 495 additions and 287 deletions
|
|
@ -1,13 +1,15 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals, print_function
|
||||
__all__ = [
|
||||
'get_article',
|
||||
'unittest',
|
||||
]
|
||||
|
||||
import cStringIO
|
||||
import os
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from six import StringIO
|
||||
import logging
|
||||
from logging.handlers import BufferingHandler
|
||||
|
||||
|
|
@ -101,7 +103,7 @@ def mute(returns_output=False):
|
|||
def wrapper(*args, **kwargs):
|
||||
|
||||
saved_stdout = sys.stdout
|
||||
sys.stdout = cStringIO.StringIO()
|
||||
sys.stdout = StringIO()
|
||||
|
||||
try:
|
||||
out = func(*args, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue