diff --git a/assets/favicon/generate b/assets/favicon/generate index e734433754..b4a3fe0d51 100755 --- a/assets/favicon/generate +++ b/assets/favicon/generate @@ -1,6 +1,8 @@ #!/usr/bin/env python2.7 +from __future__ import absolute_import import xml.etree.ElementTree as ET import subprocess +from six.moves import range # 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] for name in ('number_back', 'number_front')] -for i in xrange(1, 100): +for i in range(1, 100): # Prepare a modified SVG s = '%2d' % (i,) for e in elems: diff --git a/bots/check-mirroring b/bots/check-mirroring index a0215e8b0f..9794df9866 100755 --- a/bots/check-mirroring +++ b/bots/check-mirroring @@ -1,5 +1,6 @@ #!/usr/bin/env python2.7 from __future__ import print_function +from __future__ import absolute_import import sys import time import optparse @@ -8,6 +9,7 @@ import random import logging import subprocess import hashlib +from six.moves import range parser = optparse.OptionParser() parser.add_option('--verbose', @@ -150,7 +152,7 @@ for (stream, test) in test_streams: zephyr_subs_to_add.append((stream, '*', '*')) actually_subscribed = False -for tries in xrange(10): +for tries in range(10): try: zephyr.init() zephyr._z.subAll(zephyr_subs_to_add) diff --git a/puppet/zulip_internal/files/zulip-ec2-configure-interfaces b/puppet/zulip_internal/files/zulip-ec2-configure-interfaces index f9a43c3297..53b6fa47ce 100755 --- a/puppet/zulip_internal/files/zulip-ec2-configure-interfaces +++ b/puppet/zulip_internal/files/zulip-ec2-configure-interfaces @@ -42,6 +42,7 @@ interfaces. ''' +from __future__ import absolute_import import sys import logging import logging.handlers @@ -50,6 +51,7 @@ import re import boto.utils import netifaces +from six.moves import range def address_of(device_id): try: diff --git a/tools/check-templates b/tools/check-templates index fb1bb0d919..a180cf36ad 100755 --- a/tools/check-templates +++ b/tools/check-templates @@ -5,6 +5,7 @@ import sys import subprocess from six.moves import filter from six.moves import map +from six.moves import range class Record: pass