Skip to content

Commit

Permalink
refix string format for python2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
joke2k committed Mar 30, 2014
1 parent 0e6b29e commit da737b5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions faker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,13 @@ def execute(self):
default_locale = DEFAULT_LOCALE

formatter_class = argparse.RawDescriptionHelpFormatter
parser = argparse.ArgumentParser(description='Faker version %s (default lang: %s)' % (VERSION, default_locale),
formatter_class=formatter_class)
parser = argparse.ArgumentParser(
prog=self.prog_name,
description='{0} version {1}'.format(self.prog_name, VERSION),
formatter_class=formatter_class)

parser.add_argument("--version", action="version",
version="%(prog)s {}".format(VERSION))
version="%(prog)s {0}".format(VERSION))

parser.add_argument('-o', metavar="output",
type=argparse.FileType('w'), default=sys.stdout,
Expand Down

0 comments on commit da737b5

Please sign in to comment.