]> glassweightruler.freedombox.rocks Git - waydroid.git/blobdiff - tools/helpers/lxc.py
lxc: Fix bad eol of proc dt values
[waydroid.git] / 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)