mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-13 02:30:11 +01: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",
|
||||
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()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user