diff options
Diffstat (limited to 'branding')
-rwxr-xr-x | branding/scripts/gen-qtinstaller | 5 | ||||
-rw-r--r-- | branding/scripts/provider.py | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/branding/scripts/gen-qtinstaller b/branding/scripts/gen-qtinstaller index 58ab3f9..1f2c03d 100755 --- a/branding/scripts/gen-qtinstaller +++ b/branding/scripts/gen-qtinstaller @@ -35,11 +35,9 @@ OS_CONFIG = { """ } - - def getData(): config = configparser.ConfigParser() - configPath = os.path.join(here(), '../../branding/config/vendor.conf') + configPath = os.path.join(VENDOR_PATH, 'vendor.conf') config.read(configPath) provider = os.environ.get('PROVIDER') @@ -120,7 +118,6 @@ def getVersion(): return os.environ.get('VERSION', 'unknown') if __name__ == "__main__": - # TODO get from vendor - maybe just in provider module VENDOR_PATH = os.environ.get('VENDOR_PATH') if len(sys.argv) != 3: diff --git a/branding/scripts/provider.py b/branding/scripts/provider.py index 9f6bb08..8904c37 100644 --- a/branding/scripts/provider.py +++ b/branding/scripts/provider.py @@ -15,10 +15,12 @@ def getDefaultProvider(config): def getProviderData(provider, config): print("[+] Configured provider:", provider) - - c = config[provider] + try: + c = config[provider] + except Exception: + raise ValueError('Cannot find provider') + d = dict() - keys = ('name', 'applicationName', 'binaryName', 'auth', 'authEmptyPass', 'providerURL', 'tosURL', 'helpURL', 'askForDonations', 'donateURL', 'apiURL', |