Reverting metaclass wrapper for db_key, will have to look into why it behaves strangely.

This commit is contained in:
Griatch 2013-07-12 23:58:22 +02:00
parent 73a5800fbf
commit 7b0c96640c
3 changed files with 22 additions and 23 deletions

View file

@ -213,15 +213,15 @@ def format_script_list(scripts):
table.align = 'r'
for script in scripts:
nextrep = script.time_until_next_repeat()
print ([script.id,
(not hasattr(script, 'obj') or not script.obj) and "<Global>" or script.obj.key,
script.key,
(not hasattr(script, 'interval') or script.interval < 0) and "--" or "%ss" % script.interval,
not nextrep and "--" or "%ss" % nextrep,
(not hasattr(script, 'repeats') or not script.repeats) and "--" or "%i" % script.repeats,
script.persistent and "*" or "-",
script.typeclass_path.rsplit('.', 1)[-1],
script.desc])
#print ([script.id,
# (not hasattr(script, 'obj') or not script.obj) and "<Global>" or script.obj.key,
# script.key,
# (not hasattr(script, 'interval') or script.interval < 0) and "--" or "%ss" % script.interval,
# not nextrep and "--" or "%ss" % nextrep,
# (not hasattr(script, 'repeats') or not script.repeats) and "--" or "%i" % script.repeats,
# script.persistent and "*" or "-",
# script.typeclass_path.rsplit('.', 1)[-1],
# script.desc])
table.add_row([script.id,
(not hasattr(script, 'obj') or not script.obj) and "<Global>" or script.obj.key,
script.key,