Esempio n. 1
0
 def processObject(self, obj):
     """Operate on the provided command object."""
     # ask the user if we should continue
     if not obj.pre(self, "Change keys of this command?"):
         return
     # try to run the operation
     query.chkeys(obj, keystr=self.opts.keystr)
     obj.post(self, "keys changed")
Esempio n. 2
0
File: test.py Progetto: utsdab/usr
def test_command_ops(command):
    print "cattr"
    tq.cattr(command, key="tags", value=["new", "tags"])
    print "chkeys"
    tq.chkeys(command, keystr="newService")