~jocave/checkbox/hybrid-amd-gpu-mods

« back to all changes in this revision

Viewing changes to checkbox-old/patches/0.5

  • Committer: Tarmac
  • Author(s): Brendan Donegan
  • Date: 2013-06-03 11:12:58 UTC
  • mfrom: (2154.2.1 bug1185759)
  • Revision ID: tarmac-20130603111258-1b3m5ydvkf1accts
"[r=zkrynicki][bug=1185759][author=brendan-donegan] automatic merge by tarmac"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python3
 
2
 
 
3
import sys
 
4
 
 
5
from io import StringIO
 
6
 
 
7
 
 
8
def Config(filename):
 
9
    globals = {}
 
10
    module = "/usr/share/checkbox/install/config"
 
11
    exec(open(module), globals)
 
12
    config = globals["Config"]()
 
13
    config.read(filename)
 
14
 
 
15
    return config
 
16
 
 
17
def main(args):
 
18
    config_file = "/etc/checkbox.d/%s.ini" % args[0]
 
19
    config = Config(config_file)
 
20
 
 
21
    if config.has_section("checkbox/plugins"):
 
22
        config.set("checkbox/plugins", "blacklist", "backend_manager")
 
23
 
 
24
    # Rename options
 
25
    file = StringIO()
 
26
    config.write(file)
 
27
 
 
28
 
 
29
if __name__ == "__main__":
 
30
    main(sys.argv[1:])