Block a user
Test Pull - 2 - Auto rebase
getting os details with /api/os
Don't need to do if-else. can be one-liner like other get_*
methods.
getting os details with /api/os
os id cannot be none, so at least this method should never return a None. Also, this case should never practically happen, even if it happens, you can return 1.
getting os details with /api/os
Why is almost entry method is wrapped up in try-except? Please list down the cases where you think it'll break inside the try
and this try-except will be useful.
getting os details with /api/os
Instead of returning a hard-coded nnumber, we'll return "other" or "custom" id
getting os details with /api/os
Since /etc/os-release
doesn't exist on openwrt, we should fallback to /etc/VERSION
.
getting os details with /api/os
As discussed, we should use a combination of id
and versionId
. Check the exact key name in the file.