git://git.onelab.eu
/
plcapi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- remove max length from slice attribute values
[plcapi.git]
/
PLC
/
PCUs.py
diff --git
a/PLC/PCUs.py
b/PLC/PCUs.py
index
e3d9292
..
5b69c0a
100644
(file)
--- a/
PLC/PCUs.py
+++ b/
PLC/PCUs.py
@@
-4,7
+4,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: PCUs.py,v 1.
7 2006/11/02 18:32:55
mlhuang Exp $
+# $Id: PCUs.py,v 1.
9 2006/11/09 03:07:42
mlhuang Exp $
#
from PLC.Faults import *
#
from PLC.Faults import *
@@
-100,14
+100,14
@@
class PCUs(Table):
database.
"""
database.
"""
- def __init__(self, api, pcu_filter = None):
- Table.__init__(self, api, PCU)
+ def __init__(self, api, pcu_filter = None
, columns = None
):
+ Table.__init__(self, api, PCU
, columns
)
sql = "SELECT %s FROM view_pcus WHERE True" % \
sql = "SELECT %s FROM view_pcus WHERE True" % \
- ", ".join(
PCU.field
s)
+ ", ".join(
self.column
s)
if pcu_filter is not None:
if pcu_filter is not None:
- if isinstance(pcu_filter,
list
):
+ if isinstance(pcu_filter,
(list, tuple, set)
):
pcu_filter = Filter(PCU.fields, {'pcu_id': pcu_filter})
elif isinstance(pcu_filter, dict):
pcu_filter = Filter(PCU.fields, pcu_filter)
pcu_filter = Filter(PCU.fields, {'pcu_id': pcu_filter})
elif isinstance(pcu_filter, dict):
pcu_filter = Filter(PCU.fields, pcu_filter)