Commit 2399b718 authored by Nsukami Patrick's avatar Nsukami Patrick
Browse files

2to3: use py3 compatible functions

- use print as a function
- use range function instead of xrange function
parent f2b596741f6f
......@@ -12,6 +12,6 @@ class ServerStartupHook(hook.Hook):
bfssdir = join(self.repo.config.appdatahome, 'bfss')
if not exists(bfssdir):
makedirs(bfssdir)
print 'created', bfssdir
print('created', bfssdir)
storage = storages.BytesFileSystemStorage(bfssdir)
storages.set_attribute_storage(self.repo, 'File', 'data', storage)
......@@ -28,14 +28,14 @@ class ExpenseAccountingXmlView(EntityView):
self.w(u'<?xml-stylesheet href="%saccounting-entries.xsl" '
u'rel="stylesheet" type="text/xsl"?>\n' % self._cw.datadir_url)
self.w(u'<ecritures>\n')
for i in xrange(self.cw_rset.rowcount):
for i in range(self.cw_rset.rowcount):
self.cell_call(i, 0)
self.w(u'</ecritures>\n')
def cell_call(self, row, col):
entity = self.cw_rset.get_entity(row, col)
rset = entity.related('has_lines')
for i in xrange(len(rset)):
for i in range(len(rset)):
self.wview('accentry', rset, row=i, col=0)
......@@ -54,7 +54,7 @@ class ExpenseLineAccountingEntryXmlView(EntityView):
self.w(u'<?xml-stylesheet href="%saccounting-entries.xsl" '
u'rel="stylesheet" type="text/xsl"?>\n' % self._cw.datadir_url)
self.w(u'<ecritures>\n')
for i in xrange(self.cw_rset.rowcount):
for i in range(self.cw_rset.rowcount):
self.cell_call(i, 0)
self.w(u'</ecritures>\n')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment