Skip to content

Commit

Permalink
Py3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nursix committed Nov 29, 2019
1 parent 482287b commit 2033f41
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b'a1f4a2272' (2019-11-28 11:39:09)
nursix-dev-3362-g482287b (2019-11-29 14:16:30)
6 changes: 3 additions & 3 deletions modules/s3/codecs/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

from gluon import current, HTTP

from s3compat import StringIO
from s3compat import BytesIO
from ..s3codec import S3Codec
from ..s3resource import S3Resource
from ..s3utils import s3_str
Expand Down Expand Up @@ -178,7 +178,7 @@ def encode(self, resource, **attr):
)

# Build the doc
output_stream = StringIO()
output_stream = BytesIO()
doc.build(flowables,
output_stream,
#canvasmaker=canvas.Canvas, # is default
Expand Down Expand Up @@ -715,7 +715,7 @@ def draw_image(self,
Helper function to draw an image
- requires PIL (required for ReportLab image handling anyway)
@param img: the image (filename or StringIO buffer)
@param img: the image (filename or BytesIO buffer)
@param x: drawing position
@param y: drawing position
@param width: the target width of the image (in points)
Expand Down
2 changes: 1 addition & 1 deletion views/generic.xls
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ try:
worksheet = workbook.add_worksheet(pagename)
for (r,row) in enumerate(content):
for (c,element) in enumerate(row):
print '%s%s' % (chr(ord('A')+c),(r+1)), element
print("%s%s %s" % (chr(ord('A')+c),(r+1), element))
worksheet.write('%s%s' % (chr(ord('A')+c),(r+1)), str(element))
pass
pass
Expand Down
4 changes: 2 additions & 2 deletions views/pagenav.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{if "page" in request.vars:}}
{{try:}}
{{if totalpages <> 1:}}{{=pagenav(page=page, totalpages=totalpages)}}<br />
{{if totalpages != 1:}}{{=pagenav(page=page, totalpages=totalpages)}}<br />
{{pass}}
{{except:}}
{{try:}}{{=pagenav(page=page)}}<br />
{{except:}}{{pass}}
{{pass}}
{{pass}}
{{pass}}
4 changes: 2 additions & 2 deletions views/searchbox.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{if "page" in request.vars:}}
{{try:}}
{{if totalpages <> 1:}}
{{if totalpages != 1:}}
{{=search_btn}}
<p>&nbsp;</p>
{{pass}}
Expand All @@ -11,4 +11,4 @@
{{except:}}
{{pass}}
{{pass}}
{{pass}}
{{pass}}

0 comments on commit 2033f41

Please sign in to comment.