X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FBootStates.py;h=d58bb93f3e53c5e509b6312c4552bbb1ffbbbf37;hb=d20644a48d03667bb25dc583517de06e94606c64;hp=416ca4d48f767203eb5ce2032ca8d2e9c351ff4d;hpb=f7ce7ce813d4c44502629820a3583f32a99a98f7;p=plcapi.git diff --git a/PLC/BootStates.py b/PLC/BootStates.py index 416ca4d..d58bb93 100644 --- a/PLC/BootStates.py +++ b/PLC/BootStates.py @@ -4,9 +4,6 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id$ -# $URL$ -# from PLC.Faults import * from PLC.Parameter import Parameter @@ -28,12 +25,12 @@ class BootState(Row): def validate_boot_state(self, name): # Make sure name is not blank if not len(name): - raise PLCInvalidArgument, "Boot state must be specified" + raise PLCInvalidArgument("Boot state must be specified") - # Make sure boot state does not alredy exist + # Make sure boot state does not already exist conflicts = BootStates(self.api, [name]) if conflicts: - raise PLCInvalidArgument, "Boot state name already in use" + raise PLCInvalidArgument("Boot state name already in use") return name @@ -49,6 +46,6 @@ class BootStates(Table): ", ".join(BootState.fields) if boot_states: - sql += " WHERE boot_state IN (%s)" % ", ".join(map(api.db.quote, boot_states)) + sql += " WHERE boot_state IN (%s)" % ", ".join( [ api.db.quote (s) for s in boot_states ] ) self.selectall(sql)