mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-19 16:20:52 +00:00
Merge pull request #848 from tahoe-lafs/3462.immutable-encode-python-3
Port allmydata.immutable.encode to Python 3 Fixes ticket:3462
This commit is contained in:
commit
d3f38350d1
0
newsfragments/3462.minor
Normal file
0
newsfragments/3462.minor
Normal file
@ -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…
x
Reference in New Issue
Block a user