mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-14 02:50:12 +01:00
Switch to io.StringIO
This commit is contained in:
parent
e3591cb7b8
commit
ca5ee87b16
@ -23,11 +23,7 @@ import re
|
||||
import glob
|
||||
import cgi
|
||||
import textwrap
|
||||
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
except:
|
||||
from StringIO import StringIO
|
||||
import io
|
||||
|
||||
import yaml
|
||||
# use libyaml if it is available
|
||||
@ -513,8 +509,8 @@ class DescriptionFormatter:
|
||||
self.laststate = self.stNONE
|
||||
self.text_html = ''
|
||||
self.text_txt = ''
|
||||
self.html = StringIO()
|
||||
self.text = StringIO()
|
||||
self.html = io.StringIO()
|
||||
self.text = io.StringIO()
|
||||
self.para_lines = []
|
||||
self.linkResolver = None
|
||||
self.linkResolver = linkres
|
||||
|
@ -20,10 +20,7 @@
|
||||
from argparse import ArgumentParser
|
||||
import os
|
||||
import logging
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
except:
|
||||
from StringIO import StringIO
|
||||
import io
|
||||
|
||||
import common
|
||||
import metadata
|
||||
@ -33,7 +30,7 @@ options = None
|
||||
|
||||
|
||||
def proper_format(app):
|
||||
s = StringIO()
|
||||
s = io.StringIO()
|
||||
# TODO: currently reading entire file again, should reuse first
|
||||
# read in metadata.py
|
||||
with open(app.metadatapath, 'r') as f:
|
||||
|
Loading…
Reference in New Issue
Block a user