mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
Ported to Python 3.
This commit is contained in:
parent
d0d7a82734
commit
9e2a79ee23
@ -1,3 +1,15 @@
|
||||
"""
|
||||
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 os, time
|
||||
from io import BytesIO
|
||||
from itertools import count
|
||||
@ -446,7 +458,7 @@ class Publish(object):
|
||||
|
||||
# then we add in all the shares that were bad (corrupted, bad
|
||||
# signatures, etc). We want to replace these.
|
||||
for key, old_checkstring in self._servermap.get_bad_shares().items():
|
||||
for key, old_checkstring in list(self._servermap.get_bad_shares().items()):
|
||||
(server, shnum) = key
|
||||
self.goal.add( (server,shnum) )
|
||||
self.bad_share_checkstrings[(server,shnum)] = old_checkstring
|
||||
@ -1105,7 +1117,7 @@ class Publish(object):
|
||||
self.bad_servers.add(server) # don't ask them again
|
||||
# use the checkstring to add information to the log message
|
||||
unknown_format = False
|
||||
for (shnum,readv) in read_data.items():
|
||||
for (shnum,readv) in list(read_data.items()):
|
||||
checkstring = readv[0]
|
||||
version = get_version_from_checkstring(checkstring)
|
||||
if version == MDMF_VERSION:
|
||||
|
@ -56,6 +56,7 @@ PORTED_MODULES = [
|
||||
"allmydata.mutable.checker",
|
||||
"allmydata.mutable.common",
|
||||
"allmydata.mutable.filenode",
|
||||
"allmydata.mutable.publish",
|
||||
"allmydata.node",
|
||||
"allmydata.storage_client",
|
||||
"allmydata.storage.common",
|
||||
|
Loading…
x
Reference in New Issue
Block a user