regebro / tzlocal

A Python module that tries to figure out what your local timezone is
MIT License
184 stars 58 forks source link

Unix: continue after getprop failed #137

Closed Rongronggg9 closed 1 year ago

Rongronggg9 commented 1 year ago

Some proot scripts will map /system into the proot environment. Still, a proot environment is virtually an "installation" of Linux distribution and thus has no getprop wrapper from Termux (/data/data/com.termux/files/usr/bin/getprop). Even if the vanilla getprop (/system/bin/getprop) is in PATH, it is very likely to crash in a proot environment.

The patch is to suppress errors during trying to getprop in order to make tzlocal not crash in a proot environment.

regebro commented 1 year ago

Thanks