Skip to content

Commit a779734

Browse files
author
Richard Jones
committed
fixed error in indexargs_url (thanks Patrick Ohly)
fixed getnode [SF#684531]
1 parent d1631e4 commit a779734

File tree

7 files changed

+16
-13
lines changed

7 files changed

+16
-13
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,11 @@ are given with the most recent entry first.
4343
return positive values..." (literal 0xffff0000 in portalocker.py)
4444
- fixed ZPT code generating SyntaxWarning for assignment to None
4545
- add "ago" to intervals in the past (sf bug 679232)
46+
- clarified licensing
4647
- another attempt to fix cookie misbehaviour - customise cookie name using
4748
tracker name
49+
- fixed error in indexargs_url (thanks Patrick Ohly)
50+
- fixed getnode (sf bug 684531)
4851

4952

5053
2003-??-?? 0.5.6

doc/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ Luke Opperman,
6969
Will Partain,
7070
Bernhard Reiter,
7171
John P. Rouillard,
72+
Florian Schulze,
7273
Dougal Scott,
7374
Stefan Seefeld,
7475
Jeffrey P Shell,

roundup/backends/back_anydbm.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: back_anydbm.py,v 1.100 2003-02-06 05:43:47 richard Exp $
18+
#$Id: back_anydbm.py,v 1.101 2003-02-12 00:00:18 richard Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -30,7 +30,7 @@
3030
from roundup.indexer import Indexer
3131
from roundup.backends import locking
3232
from roundup.hyperdb import String, Password, Date, Interval, Link, \
33-
Multilink, DatabaseError, Boolean, Number
33+
Multilink, DatabaseError, Boolean, Number, Node
3434

3535
#
3636
# Now the database

roundup/backends/back_metakit.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def Database(config, journaltag=None):
5050
pass
5151
return db
5252

53-
class _Database(hyperdb.Database):
53+
class _Database(hyperdb.Database, roundupdb.Database):
5454
def __init__(self, config, journaltag=None):
5555
self.config = config
5656
self.journaltag = journaltag
@@ -1206,13 +1206,16 @@ def __init__(self, db, classname, **properties):
12061206

12071207
def get(self, nodeid, propname, default=_marker, cache=1):
12081208
x = Class.get(self, nodeid, propname, default, cache)
1209+
poss_msg = 'Possibly an access right configuration problem.'
12091210
if propname == 'content':
12101211
if x.startswith('file:'):
12111212
fnm = x[5:]
12121213
try:
12131214
x = open(fnm, 'rb').read()
1214-
except Exception, e:
1215-
x = repr(e)
1215+
except IOError, (strerror):
1216+
# XXX by catching this we donot see an error in the log.
1217+
return 'ERROR reading file: %s%s\n%s\n%s'%(
1218+
self.classname, nodeid, poss_msg, strerror)
12161219
return x
12171220

12181221
def create(self, **propvalues):

roundup/backends/rdbms_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.31 2003-02-08 15:31:28 kedder Exp $
1+
# $Id: rdbms_common.py,v 1.32 2003-02-12 00:00:25 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -27,7 +27,7 @@
2727
# roundup modules
2828
from roundup import hyperdb, date, password, roundupdb, security
2929
from roundup.hyperdb import String, Password, Date, Interval, Link, \
30-
Multilink, DatabaseError, Boolean, Number
30+
Multilink, DatabaseError, Boolean, Number, Node
3131
from roundup.backends import locking
3232

3333
# support

roundup/cgi/client.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.77 2003-02-07 04:49:13 richard Exp $
1+
# $Id: client.py,v 1.78 2003-02-12 00:00:28 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -1166,10 +1166,6 @@ def _post_editnode(self, nid):
11661166
11671167
This is typically used on, eg. the file upload page to indicated
11681168
which issue to link the file to.
1169-
1170-
TODO: I suspect that this and newfile will go away now that
1171-
there's the ability to upload a file using the issue :file form
1172-
element!
11731169
'''
11741170
cn = self.classname
11751171
cl = self.db.classes[cn]

roundup/cgi/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ def indexargs_url(self, url, args):
15261526
else:
15271527
val = self.group[1]
15281528
l.append(':group=%s'%val)
1529-
if self.filter and not args.has_key(':columns'):
1529+
if self.filter and not args.has_key(':filter'):
15301530
l.append(':filter=%s'%(','.join(self.filter)))
15311531
for k,v in self.filterspec.items():
15321532
if not args.has_key(k):

0 commit comments

Comments
 (0)