File: remove-usage-of-bundled-vdf.patch

package info (click to toggle)
protontricks 1.13.1%2Bds-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 716 kB
  • sloc: python: 5,237; sh: 247; xml: 68; makefile: 9
file content (36 lines) | stat: -rw-r--r-- 1,188 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Description: Remove usage of bundled vdf, because this package doesn't include it
Author: Ilya Orlov <ilyaorlov124@gmail.com>
Forwarded: not-needed

--- a/src/protontricks/steam.py
+++ b/src/protontricks/steam.py
@@ -10,7 +10,6 @@
 
 import vdf
 
-from ._vdf import binary_loads as vendored_binary_loads
 from .util import is_steam_deck, lower_dict
 
 __all__ = (
@@ -587,18 +586,9 @@
 
             i += section_size
 
-            try:
-                vdf_d = vdf.binary_loads(
-                    data[i:i+vdf_section_size], key_table=key_table
-                )
-            except TypeError:
-                # System 'vdf' is too old and does not support 'key_table',
-                # use the bundled one instead. This is cursed, but it's
-                # so far the only reasonable option without a proper maintained
-                # release on PyPI.
-                vdf_d = vendored_binary_loads(
-                    data[i:i+vdf_section_size], key_table=key_table
-                )
+            vdf_d = vdf.binary_loads(
+                data[i:i+vdf_section_size], key_table=key_table
+            )
 
             vdf_d = lower_dict(vdf_d)
             yield vdf_d