mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 15:30:28 +03:00
Make text formatting faster via StringIO
Avoid concatenating strings over and over. Also, the wiki formatting wasn't necessary at all since it was just joining lines.
This commit is contained in:
parent
088929711c
commit
1b43d8e33c
2 changed files with 47 additions and 36 deletions
|
|
@ -21,7 +21,10 @@
|
|||
from argparse import ArgumentParser
|
||||
import os
|
||||
import logging
|
||||
import StringIO
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
except:
|
||||
from StringIO import StringIO
|
||||
|
||||
import common
|
||||
import metadata
|
||||
|
|
@ -70,7 +73,7 @@ def main():
|
|||
to_ext = options.to
|
||||
|
||||
if options.list:
|
||||
s = StringIO.StringIO()
|
||||
s = StringIO()
|
||||
# TODO: currently reading entire file again, should reuse first
|
||||
# read in metadata.py
|
||||
with open(metadatapath, 'r') as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue