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,3 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals, print_function
|
||||
try:
|
||||
import unittest2 as unittest
|
||||
except ImportError:
|
||||
|
|
@ -34,7 +36,7 @@ def recursiveDiff(dcmp):
|
|||
for f in dcmp.right_only],
|
||||
}
|
||||
for sub_dcmp in dcmp.subdirs.values():
|
||||
for k, v in recursiveDiff(sub_dcmp).iteritems():
|
||||
for k, v in recursiveDiff(sub_dcmp).items():
|
||||
diff[k] += v
|
||||
return diff
|
||||
|
||||
|
|
@ -48,7 +50,7 @@ class TestPelican(unittest.TestCase):
|
|||
logging.getLogger().addHandler(self.logcount_handler)
|
||||
self.temp_path = mkdtemp()
|
||||
self.old_locale = locale.setlocale(locale.LC_ALL)
|
||||
locale.setlocale(locale.LC_ALL, 'C')
|
||||
locale.setlocale(locale.LC_ALL, str('C'))
|
||||
|
||||
def tearDown(self):
|
||||
rmtree(self.temp_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue