comparison roundup/cgi/actions.py @ 5044:dce3cfe7ec61

Remove roundup.anypy.io_ The io_ module was being used to provide backwards compatibility for python v2.5. Roundup has dropped support for python v2.5 so we can get rid of it.
author John Kristensen <john@jerrykan.com>
date Wed, 11 Feb 2015 00:44:16 +1100
parents 0428d2004a86
children e424987d294a
comparison
equal deleted inserted replaced
5043:ac0c117cd24c 5044:dce3cfe7ec61
1 import re, cgi, time, random, csv, codecs 1 import re, cgi, time, random, csv, codecs
2 from io import BytesIO
2 3
3 from roundup import hyperdb, token, date, password 4 from roundup import hyperdb, token, date, password
4 from roundup.actions import Action as BaseAction 5 from roundup.actions import Action as BaseAction
5 from roundup.i18n import _ 6 from roundup.i18n import _
6 from roundup.cgi import exceptions, templating 7 from roundup.cgi import exceptions, templating
7 from roundup.mailgw import uidFromAddress 8 from roundup.mailgw import uidFromAddress
8 from roundup.exceptions import Reject, RejectRaw 9 from roundup.exceptions import Reject, RejectRaw
9 from roundup.anypy import io_, urllib_ 10 from roundup.anypy import urllib_
10 11
11 __all__ = ['Action', 'ShowAction', 'RetireAction', 'SearchAction', 12 __all__ = ['Action', 'ShowAction', 'RetireAction', 'SearchAction',
12 'EditCSVAction', 'EditItemAction', 'PassResetAction', 13 'EditCSVAction', 'EditItemAction', 'PassResetAction',
13 'ConfRegoAction', 'RegisterAction', 'LoginAction', 'LogoutAction', 14 'ConfRegoAction', 'RegisterAction', 'LoginAction', 'LogoutAction',
14 'NewItemAction', 'ExportCSVAction'] 15 'NewItemAction', 'ExportCSVAction']
295 # sorted and starting with the "id" column 296 # sorted and starting with the "id" column
296 props_without_id.sort() 297 props_without_id.sort()
297 props = ['id'] + props_without_id 298 props = ['id'] + props_without_id
298 299
299 # do the edit 300 # do the edit
300 rows = io_.BytesIO(self.form['rows'].value) 301 rows = BytesIO(self.form['rows'].value)
301 reader = csv.reader(rows) 302 reader = csv.reader(rows)
302 found = {} 303 found = {}
303 line = 0 304 line = 0
304 for values in reader: 305 for values in reader:
305 line += 1 306 line += 1

Roundup Issue Tracker: http://roundup-tracker.org/