Line | |
---|
1 | from lib.SyncerTypes import * |
---|
2 | from subprocess import check_call |
---|
3 | |
---|
4 | class handler_dconf(IPlugin): |
---|
5 | |
---|
6 | def init_plugin(self): |
---|
7 | self.typeplug = 'dconf' |
---|
8 | self.params = ['key', 'value'] |
---|
9 | |
---|
10 | def process(self,*args,**kwargs): |
---|
11 | params = self.get_params(*args, **kwargs) |
---|
12 | exit_code=check_call(['dconf','write',params['key'],'\''+params['value']+'\'']) |
---|
13 | if (exit_code == 0): |
---|
14 | status=True |
---|
15 | else: |
---|
16 | status=False |
---|
17 | output="Executed dconf write {} '{}'".format(params['key'],params['value']) |
---|
18 | return status,output |
---|
Note: See
TracBrowser
for help on using the repository browser.