evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / manuf / internal_db_update_nix.patch
blob174c71e469294aa1d5843500e063473f47b3eafe
1 diff --git a/manuf/manuf.py b/manuf/manuf.py
2 index e5e9193..09e9687 100755
3 --- a/manuf/manuf.py
4 +++ b/manuf/manuf.py
5 @@ -65,8 +65,14 @@ class MacParser(object):
6 WFA_URL = "https://gitlab.com/wireshark/wireshark/raw/master/wka"
8 def __init__(self, manuf_name=None, update=False):
9 - self._manuf_name = manuf_name or self.get_packaged_manuf_file_path()
10 - if update:
11 + if manuf_name is not None:
12 + self._manuf_name = manuf_name
13 + self.external_db = True
14 + else:
15 + self._manuf_name = self.get_packaged_manuf_file_path()
16 + self.external_db = False
18 + if update and self.external_db:
19 self.update()
20 else:
21 self.refresh()
22 @@ -134,6 +140,9 @@ class MacParser(object):
23 URLError: If the download fails
25 """
26 + if manuf_url is None and not self.external_db:
27 + return
29 if not manuf_url:
30 manuf_url = self.MANUF_URL
31 if not manuf_name: