mirror of https://github.com/zulip/zulip.git
Apply Python 3 futurize transform libmodernize.fixes.fix_xrange_six
Refer to #256
This commit is contained in:
parent
aa505b0d55
commit
b9e792c4e6
|
@ -1,6 +1,8 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python2.7
|
||||||
|
from __future__ import absolute_import
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from six.moves import range
|
||||||
|
|
||||||
# Generates the favicon images containing unread message counts.
|
# Generates the favicon images containing unread message counts.
|
||||||
|
|
||||||
|
@ -10,7 +12,7 @@ elems = [tree.getroot().findall(
|
||||||
".//*[@id='%s']/{http://www.w3.org/2000/svg}tspan" % (name,))[0]
|
".//*[@id='%s']/{http://www.w3.org/2000/svg}tspan" % (name,))[0]
|
||||||
for name in ('number_back', 'number_front')]
|
for name in ('number_back', 'number_front')]
|
||||||
|
|
||||||
for i in xrange(1, 100):
|
for i in range(1, 100):
|
||||||
# Prepare a modified SVG
|
# Prepare a modified SVG
|
||||||
s = '%2d' % (i,)
|
s = '%2d' % (i,)
|
||||||
for e in elems:
|
for e in elems:
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python2.7
|
#!/usr/bin/env python2.7
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
from __future__ import absolute_import
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import optparse
|
import optparse
|
||||||
|
@ -8,6 +9,7 @@ import random
|
||||||
import logging
|
import logging
|
||||||
import subprocess
|
import subprocess
|
||||||
import hashlib
|
import hashlib
|
||||||
|
from six.moves import range
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
parser.add_option('--verbose',
|
parser.add_option('--verbose',
|
||||||
|
@ -150,7 +152,7 @@ for (stream, test) in test_streams:
|
||||||
zephyr_subs_to_add.append((stream, '*', '*'))
|
zephyr_subs_to_add.append((stream, '*', '*'))
|
||||||
|
|
||||||
actually_subscribed = False
|
actually_subscribed = False
|
||||||
for tries in xrange(10):
|
for tries in range(10):
|
||||||
try:
|
try:
|
||||||
zephyr.init()
|
zephyr.init()
|
||||||
zephyr._z.subAll(zephyr_subs_to_add)
|
zephyr._z.subAll(zephyr_subs_to_add)
|
||||||
|
|
|
@ -42,6 +42,7 @@ interfaces.
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
from __future__ import absolute_import
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import logging.handlers
|
import logging.handlers
|
||||||
|
@ -50,6 +51,7 @@ import re
|
||||||
|
|
||||||
import boto.utils
|
import boto.utils
|
||||||
import netifaces
|
import netifaces
|
||||||
|
from six.moves import range
|
||||||
|
|
||||||
def address_of(device_id):
|
def address_of(device_id):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -5,6 +5,7 @@ import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
from six.moves import filter
|
from six.moves import filter
|
||||||
from six.moves import map
|
from six.moves import map
|
||||||
|
from six.moves import range
|
||||||
|
|
||||||
class Record:
|
class Record:
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in New Issue