mirror of
https://github.com/revanced/revanced-static-api.git
synced 2025-05-02 15:44:26 +02:00
feat: Handle missing keys in generator configs
This commit is contained in:
parent
36295fec64
commit
1e515062d5
@ -3,7 +3,6 @@ from app import api
|
|||||||
from app.utils import get_repository_name, to_json, write_json, read_json, create_if_not_exists
|
from app.utils import get_repository_name, to_json, write_json, read_json, create_if_not_exists
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
|
|
||||||
|
|
||||||
class Generator:
|
class Generator:
|
||||||
_api: api.Api
|
_api: api.Api
|
||||||
|
|
||||||
@ -137,8 +136,8 @@ class DonationsGenerator(Generator):
|
|||||||
super().__init__("donations", api)
|
super().__init__("donations", api)
|
||||||
|
|
||||||
def generate(self, config, path):
|
def generate(self, config, path):
|
||||||
donation_links = config["links"]
|
donation_links = config["links"] if "links" in config else []
|
||||||
donation_wallets = config["wallets"]
|
donation_wallets = config["wallets"] if "wallets" in config else []
|
||||||
|
|
||||||
donation_path = join(path, f"donations.json")
|
donation_path = join(path, f"donations.json")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user