mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 04:57:54 +00:00
Port to Python 3.
This commit is contained in:
parent
1a9c4232aa
commit
3e87ba368e
@ -1,5 +1,18 @@
|
||||
# -*- test-case-name: allmydata.test.test_encode -*-
|
||||
|
||||
"""
|
||||
Ported to Python 3.
|
||||
"""
|
||||
|
||||
from __future__ import division
|
||||
from __future__ import absolute_import
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from future.utils import PY2
|
||||
if PY2:
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, dict, list, object, range, str, max, min # noqa: F401
|
||||
|
||||
import time
|
||||
from zope.interface import implementer
|
||||
from twisted.internet import defer
|
||||
@ -468,7 +481,7 @@ class Encoder(object):
|
||||
(self,
|
||||
self.segment_size*(segnum+1),
|
||||
self.segment_size*self.num_segments,
|
||||
100 * (segnum+1) / self.num_segments,
|
||||
100 * (segnum+1) // self.num_segments,
|
||||
),
|
||||
level=log.OPERATIONAL)
|
||||
elapsed = time.time() - start
|
||||
|
@ -40,6 +40,7 @@ PORTED_MODULES = [
|
||||
"allmydata.immutable.downloader.segmentation",
|
||||
"allmydata.immutable.downloader.share",
|
||||
"allmydata.immutable.downloader.status",
|
||||
"allmydata.immutable.encode",
|
||||
"allmydata.immutable.happiness_upload",
|
||||
"allmydata.immutable.literal",
|
||||
"allmydata.interfaces",
|
||||
|
Loading…
Reference in New Issue
Block a user