mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-09 03:44:23 +00:00
Port to Python 3.
This commit is contained in:
parent
252f35a2c7
commit
180c6d7536
@ -1,3 +1,15 @@
|
||||
"""
|
||||
Ported to Python 3.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from future.utils import PY2
|
||||
if PY2:
|
||||
# Omit dict so Python 3 changes don't leak into API callers on Python 2.
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, bytes, list, object, range, str, max, min # noqa: F401
|
||||
from past.utils import old_div
|
||||
|
||||
import struct
|
||||
@ -1744,7 +1756,7 @@ class MDMFSlotReadProxy(object):
|
||||
|
||||
|
||||
def _read(self, readvs, force_remote=False):
|
||||
unsatisfiable = list(filter(lambda x: x[0] + x[1] > len(self._data), readvs))
|
||||
unsatisfiable = [x for x in readvs if x[0] + x[1] > len(self._data)]
|
||||
# TODO: It's entirely possible to tweak this so that it just
|
||||
# fulfills the requests that it can, and not demand that all
|
||||
# requests are satisfiable before running it.
|
||||
|
@ -56,6 +56,7 @@ PORTED_MODULES = [
|
||||
"allmydata.mutable.checker",
|
||||
"allmydata.mutable.common",
|
||||
"allmydata.mutable.filenode",
|
||||
"allmydata.mutable.layout",
|
||||
"allmydata.mutable.publish",
|
||||
"allmydata.node",
|
||||
"allmydata.storage_client",
|
||||
|
Loading…
x
Reference in New Issue
Block a user