Project

General

Profile

« Previous | Next » 

Revision 3a90084e

Added by koszko over 1 year ago

facilitate initialization of IndexedDB for use by Haketilo

View differences:

test/script_loader.py
51 51

  
52 52
def wrapped_script(script_path, wrap_partially=True):
53 53
    if script_path == 'exports_init.js':
54
        with open(script_root / 'MOZILLA_exports_init.js') as script:
54
        if not (script_root / 'exports_init.js').exists():
55
            subprocess.run([str(script_root / 'write_exports_init.sh'),
56
                            'mozilla', '.', 'default_settings.json'],
57
                           cwd=script_root, check=True)
58

  
59
        with open(script_root / 'exports_init.js') as script:
55 60
            return script.read()
56 61

  
57 62
    command = 'partially_wrapped_code' if wrap_partially else 'wrapped_code'

Also available in: Unified diff