mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-05-02 17:12:59 +00:00
Ported to Python 3.
This commit is contained in:
parent
87838dd2bb
commit
867a1b71a1
@ -0,0 +1,13 @@
|
|||||||
|
"""
|
||||||
|
Ported to Python 3.
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
from __future__ import absolute_import
|
||||||
|
from __future__ import division
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
|
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
|
||||||
|
|
@ -1,3 +1,14 @@
|
|||||||
|
"""
|
||||||
|
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 itertools
|
import itertools
|
||||||
from zope.interface import implementer
|
from zope.interface import implementer
|
||||||
@ -257,7 +268,7 @@ class DownloadStatus(object):
|
|||||||
# else ignore completed requests
|
# else ignore completed requests
|
||||||
if not total_outstanding:
|
if not total_outstanding:
|
||||||
return 1.0
|
return 1.0
|
||||||
return 1.0 * total_received / total_outstanding
|
return total_received / total_outstanding
|
||||||
|
|
||||||
def using_helper(self):
|
def using_helper(self):
|
||||||
return False
|
return False
|
||||||
|
@ -33,6 +33,8 @@ PORTED_MODULES = [
|
|||||||
"allmydata.crypto.util",
|
"allmydata.crypto.util",
|
||||||
"allmydata.hashtree",
|
"allmydata.hashtree",
|
||||||
"allmydata.immutable.happiness_upload",
|
"allmydata.immutable.happiness_upload",
|
||||||
|
"allmydata.immutable.downloader",
|
||||||
|
"allmydata.immutable.downloader.status",
|
||||||
"allmydata.interfaces",
|
"allmydata.interfaces",
|
||||||
"allmydata.introducer.interfaces",
|
"allmydata.introducer.interfaces",
|
||||||
"allmydata.monitor",
|
"allmydata.monitor",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user