mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[mod] add Table.__{g,s}etitem__ for backward compatibility
This commit is contained in:
parent
41539a2769
commit
250fc4d728
1 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,12 @@ class Table:
|
||||||
self.title = title
|
self.title = title
|
||||||
self.row_function = row_function
|
self.row_function = row_function
|
||||||
|
|
||||||
|
def __getitem__(self, key):
|
||||||
|
return self.data[key]
|
||||||
|
|
||||||
|
def __setitem__(self, key, value):
|
||||||
|
self.data[key] = value
|
||||||
|
|
||||||
def print(self):
|
def print(self):
|
||||||
if not self.data:
|
if not self.data:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue