mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 10:40:12 +02:00
update.py: Allow to output pretty (human-readable) index.xml .
This commit is contained in:
parent
56ebfc0c18
commit
40201fdf48
@ -53,6 +53,8 @@ parser.add_option("-i", "--interactive", default=False, action="store_true",
|
|||||||
parser.add_option("-e", "--editor", default="/etc/alternatives/editor",
|
parser.add_option("-e", "--editor", default="/etc/alternatives/editor",
|
||||||
help="Specify editor to use in interactive mode. Default "+
|
help="Specify editor to use in interactive mode. Default "+
|
||||||
"is /etc/alternatives/editor")
|
"is /etc/alternatives/editor")
|
||||||
|
parser.add_option("", "--pretty", action="store_true", default=False,
|
||||||
|
help="Produce human-readable index.xml")
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
@ -439,7 +441,10 @@ for app in apps:
|
|||||||
apps_disabled += 1
|
apps_disabled += 1
|
||||||
|
|
||||||
of = open(os.path.join('repo','index.xml'), 'wb')
|
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.write(output)
|
||||||
of.close()
|
of.close()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user