File: test_load_config.py

package info (click to toggle)
berrynet 3.10.2-2
  • links: PTS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,572 kB
  • sloc: python: 6,286; javascript: 2,373; xml: 1,094; sh: 738; makefile: 33
file content (15 lines) | stat: -rw-r--r-- 310 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python

import json
import subprocess


def loadConfig():
    cmd = ("node -e \"const config = "
        "require('../config'); console.log(JSON.stringify(config));\"")
    config = json.loads(subprocess.check_output(cmd, shell=True))
    print(config)


if __name__ == '__main__':
    loadConfig()