[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [bridgedb/master] Fix python2.6 syntax errors.
commit e690b3ed22ad78b903ffd9d66b88fe757d1cead2
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
Date: Tue Oct 15 14:48:32 2013 +0000
Fix python2.6 syntax errors.
These were the result of using indexless format string syntax, which was
introduced in Python-3.1 (and then it was backported to some versions of 2.7,
but not 2.6, apparently).
* FIXES a couple print statement syntax in lib/bridgedb/Tests.py causing test
failure.
The failing test was:
- testDistWithFilterBlockedCountriesAdvanced (bridgedb.Tests.IPBridgeDistTests)
---
lib/bridgedb/Tests.py | 2 +-
lib/bridgedb/opt.py | 3 +--
setup.py | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/bridgedb/Tests.py b/lib/bridgedb/Tests.py
index c1e994b..a761d00 100644
--- a/lib/bridgedb/Tests.py
+++ b/lib/bridgedb/Tests.py
@@ -398,7 +398,7 @@ class IPBridgeDistTests(unittest.TestCase):
])
try: assert len(b) > 0
except AssertionError:
- print "epic fail"
+ print("epic fail")
b = d.getBridgesForIP(randomIPString(), "x", 1, bridgeFilterRules=[
filterBridgesByNotBlockedIn("us")])
assert len(b) > 0
diff --git a/lib/bridgedb/opt.py b/lib/bridgedb/opt.py
index 628f04d..8018544 100644
--- a/lib/bridgedb/opt.py
+++ b/lib/bridgedb/opt.py
@@ -104,5 +104,4 @@ class MainOptions(BaseOptions):
subCommands = [
['test', None, TestOptions,
- 'Run twisted.trial tests or unittests {}'.format(
- '(see `bridgedb test --help`)')]]
+ "Run twisted.trial tests or unittests (see `bridgedb test --help`)"]]
diff --git a/setup.py b/setup.py
index 731a22e..d01f646 100644
--- a/setup.py
+++ b/setup.py
@@ -149,7 +149,7 @@ def get_supported_langs():
with open(repo_langs, 'r') as langsfile:
for line in langsfile.readlines():
if line.startswith('supported'):
- line = "supported = {}\n".format(supported)
+ line = "supported = %s\n" % supported
print("REWROTE supported langs: %s" % line)
new_langs_lines.append(line)
with open(repo_langs, 'w') as newlangsfile:
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits