diff options
author | Antoine Beaupré <anarcat@koumbit.org> | 2015-10-08 08:54:49 -0400 |
---|---|---|
committer | Antoine Beaupré <anarcat@koumbit.org> | 2015-10-08 08:56:06 -0400 |
commit | 824f9c72a2c6d7e09f5ddba7747d7d963b5bebdd (patch) | |
tree | a3584870764fe109c18f4c4877a36d50d2a86c8a | |
parent | 6f9e04bc2101936ed69bbd1f8fffe94a74db0d6c (diff) |
cosmetic: s/cmdfile/doc/
-rw-r--r-- | setup.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -153,17 +153,17 @@ class build_usage(Command): for command, parser in choices.items(): if command is 'help': continue - with open('docs/usage/%s.rst.inc' % command, 'w') as cmdfile: + with open('docs/usage/%s.rst.inc' % command, 'w') as doc: print('generating help for %s' % command) params = {"command": command, "underline": '-' * len('borg ' + command)} - cmdfile.write(".. _borg_{command}:\n\n".format(**params)) - cmdfile.write("borg {command}\n{underline}\n::\n\n".format(**params)) + doc.write(".. _borg_{command}:\n\n".format(**params)) + doc.write("borg {command}\n{underline}\n::\n\n".format(**params)) epilog = parser.epilog parser.epilog = None - cmdfile.write(re.sub("^", " ", parser.format_help(), flags=re.M)) - cmdfile.write("\nDescription\n~~~~~~~~~~~\n") - cmdfile.write(epilog) + doc.write(re.sub("^", " ", parser.format_help(), flags=re.M)) + doc.write("\nDescription\n~~~~~~~~~~~\n") + doc.write(epilog) class build_api(Command): |