Skip to content

Commit b6297be

Browse files
author
Richard Jones
committed
py2.1 compatibility
1 parent b57a0cd commit b6297be

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

roundup/backends/blobfiles.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: blobfiles.py,v 1.15 2004-11-12 04:07:05 richard Exp $
18+
#$Id: blobfiles.py,v 1.16 2004-11-25 22:51:06 richard Exp $
1919
'''This module exports file storage for roundup backends.
2020
Files are stored into a directory hierarchy.
2121
'''
@@ -37,7 +37,7 @@ def files_in_dir(dir):
3737

3838
class FileStorage:
3939
"""Store files in some directory structure"""
40-
def filename(self, classname, nodeid, property=None, create=False):
40+
def filename(self, classname, nodeid, property=None, create=0):
4141
'''Determine what the filename for the given node and optionally
4242
property is.
4343
@@ -82,7 +82,7 @@ def storefile(self, classname, nodeid, property, content):
8282
is being saved.
8383
'''
8484
# determine the name of the file to write to
85-
name = self.filename(classname, nodeid, property, create=True)
85+
name = self.filename(classname, nodeid, property, create=1)
8686

8787
# make sure the file storage dir exists
8888
if not os.path.exists(os.path.dirname(name)):

roundup/cgi/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1428,7 +1428,7 @@ def field(self, size=30, default=None, format=_marker):
14281428
if format is not self._marker:
14291429
value = value.pretty(format)
14301430

1431-
value = cgi.escape(str(value), True)
1431+
value = cgi.escape(str(value), 1)
14321432
return self.input(name=self._formname, value=value, size=size)
14331433

14341434
def reldate(self, pretty=1):

roundup/hyperdb.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: hyperdb.py,v 1.106 2004-11-13 07:11:14 a1s Exp $
18+
# $Id: hyperdb.py,v 1.107 2004-11-25 22:51:06 richard Exp $
1919

2020
"""Hyperdatabase implementation, especially field types.
2121
"""
@@ -760,7 +760,7 @@ def export_files(self, dirname, nodeid):
760760
def import_files(self, dirname, nodeid):
761761
''' Import the "content" property as a file
762762
'''
763-
dest = self.db.filename(self.classname, nodeid, create=True)
763+
dest = self.db.filename(self.classname, nodeid, create=1)
764764
x, filename = os.path.split(dest)
765765
x, subdir = os.path.split(x)
766766
source = os.path.join(dirname, self.classname+'-files', subdir,

0 commit comments

Comments
 (0)