1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-11 15:13:27 +02:00

update.py: Allow to output pretty (human-readable) index.xml .

This commit is contained in:
Paul Sokolovsky 2012-02-15 02:18:32 +02:00 committed by Ciaran Gultnieks
parent 56ebfc0c18
commit 40201fdf48

View File

@ -53,6 +53,8 @@ parser.add_option("-i", "--interactive", default=False, action="store_true",
parser.add_option("-e", "--editor", default="/etc/alternatives/editor",
help="Specify editor to use in interactive mode. Default "+
"is /etc/alternatives/editor")
parser.add_option("", "--pretty", action="store_true", default=False,
help="Produce human-readable index.xml")
(options, args) = parser.parse_args()
@ -439,7 +441,10 @@ for app in apps:
apps_disabled += 1
of = open(os.path.join('repo','index.xml'), 'wb')
output = doc.toxml()
if options.pretty:
output = doc.toprettyxml()
else:
output = doc.toxml()
of.write(output)
of.close()