]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
lxc: Fix bad eol of proc dt values
authorErfan Abdi <erfangplus@gmail.com>
Mon, 25 Oct 2021 08:48:02 +0000 (12:18 +0330)
committerErfan Abdi <erfangplus@gmail.com>
Mon, 25 Oct 2021 08:48:02 +0000 (12:18 +0330)
tools/helpers/lxc.py

index 131944211395229fec16a94a4a266374ec85e9af..d57e63c7f4f9041494e4be213ada614f3ac0e35d 100644 (file)
@@ -231,7 +231,7 @@ def make_base_props(args):
         else:
             if os.path.isfile("/proc/device-tree/" + product):
                 with open("/proc/device-tree/" + product) as f:
         else:
             if os.path.isfile("/proc/device-tree/" + product):
                 with open("/proc/device-tree/" + product) as f:
-                    f_value = f.read().strip()
+                    f_value = f.read().strip().rstrip('\x00')
                     if f_value != "":
                         props.append("ro.product.waydroid." +
                                      product + "=" + f_value)
                     if f_value != "":
                         props.append("ro.product.waydroid." +
                                      product + "=" + f_value)