mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +00:00
Fix flakes on Python 3.
This commit is contained in:
parent
e76aa27320
commit
d25140b847
@ -7,6 +7,9 @@ from future.utils import PY3
|
||||
if PY3:
|
||||
raise RuntimeError("Just use subprocess.Popen")
|
||||
|
||||
# This is necessary to pacify flake8 on Python 3, while we're still supporting
|
||||
# Python 2.
|
||||
from past.builtins import unicode
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
@ -660,7 +660,6 @@ class Grid(GridTestMixin, WebErrorMixin, ShouldFailMixin, testutil.ReallyEqualMi
|
||||
if line]
|
||||
except ValueError:
|
||||
print("response is:", res)
|
||||
print("undecodeable line was '%s'" % line)
|
||||
raise
|
||||
self.failUnlessReallyEqual(len(units), 5+1)
|
||||
# should be parent-first
|
||||
|
@ -16,7 +16,7 @@ if PY2:
|
||||
# Don't import bytes or str, to prevent future's newbytes leaking and
|
||||
# breaking code that only expects normal bytes.
|
||||
from future.builtins import filter, map, zip, ascii, chr, hex, input, next, oct, open, pow, round, super, dict, list, object, range, max, min # noqa: F401
|
||||
str = unicode
|
||||
from past.builtins import unicode as str
|
||||
|
||||
from past.builtins import unicode, long
|
||||
|
||||
|
@ -32,7 +32,7 @@ def get_registry_setting(key, name, _topkey=None):
|
||||
regkey = winreg.OpenKey(topkey, key)
|
||||
|
||||
sublen, vallen, timestamp = winreg.QueryInfoKey(regkey)
|
||||
for validx in xrange(vallen):
|
||||
for validx in range(vallen):
|
||||
keyname, value, keytype = winreg.EnumValue(regkey, validx)
|
||||
if keyname == name and keytype == winreg.REG_SZ:
|
||||
return value
|
||||
|
Loading…
x
Reference in New Issue
Block a user