Skip to content

Commit 085a802

Browse files
committed
Merge pull request smurfix#120 from nfvs/format-python26-support
Change str.format() to support python 2.6
2 parents 5b10155 + 218f4a4 commit 085a802

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ a command:
353353
if uppercase:
354354
name = name.upper()
355355
clue = clue.upper()
356-
print "hello {}, get a {}!".format(name,clue)
356+
print "hello {0}, get a {1}!".format(name,clue)
357357

358358
> python manage.py -c dev.cfg hello -c cookie -n frank
359359
hello FRANK, get a COOKIE!

flask_script/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def handle(self, prog, args=None):
383383
try:
384384
res = handle(*args, **config)
385385
except TypeError as err:
386-
err.args = ("{}: {}".format(handle,str(err)),)
386+
err.args = ("{0}: {1}".format(handle,str(err)),)
387387
raise
388388

389389
args = [res]

0 commit comments

Comments
 (0)