diff options
| author | Adam Janovsky | 2021-12-18 13:37:20 +0100 |
|---|---|---|
| committer | Adam Janovsky | 2021-12-18 13:37:20 +0100 |
| commit | 52c73863d429db2aae45d6f6a57ecfa26b54dfd4 (patch) | |
| tree | 4e653ea297d230ba72dd0cb1e92971b353f8392f | |
| parent | a8543e1364d377878b901283eb012da3ceb0d088 (diff) | |
| download | sec-certs-52c73863d429db2aae45d6f6a57ecfa26b54dfd4.tar.gz sec-certs-52c73863d429db2aae45d6f6a57ecfa26b54dfd4.tar.zst sec-certs-52c73863d429db2aae45d6f6a57ecfa26b54dfd4.zip | |
pp: fix serializing to tmpfile, add ser. decorator
| -rw-r--r-- | sec_certs/dataset/protection_profile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sec_certs/dataset/protection_profile.py b/sec_certs/dataset/protection_profile.py index eae3cb64..34d8ee7e 100644 --- a/sec_certs/dataset/protection_profile.py +++ b/sec_certs/dataset/protection_profile.py @@ -47,11 +47,11 @@ class ProtectionProfileDataset: return cls(dct) @classmethod - def from_web(cls, store_dataset_path: Optional[Path]): + def from_web(cls, store_dataset_path: Optional[Path] = None): logger.info(f'Downloading static PP dataset from: {cls.static_dataset_url}') if not store_dataset_path: tmp = tempfile.TemporaryDirectory() - store_dataset_path = Path(tmp.name) + store_dataset_path = Path(tmp.name) / 'pp_dataset.json' helpers.download_file(cls.static_dataset_url, store_dataset_path) obj = cls.from_json(store_dataset_path) |
