source: syncer/trunk/fuentes/syncer.install/usr/lib/syncer/plugins/dconf.py @ 4039

Last change on this file since 4039 was 4039, checked in by mabarracus, 3 years ago

First release

File size: 576 bytes
Line 
1from lib.SyncerTypes import *
2from subprocess import check_call
3
4class 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.