commit ded189211eec6ac36a139f5b91fbc5441e7669fd Author: Damian Johnson atagar@torproject.org Date: Mon Aug 20 13:28:19 2018 -0700
Recognize NetBSD in is_bsd() check
Presently our unit tests fail on NetBSD due to the man's lack of an '--encoding' argument...
man --encoding=ascii -P cat foo man: unknown option -- e Usage: man [-acw|-h] [-C cfg] [-M path] [-m path] [-S srch] [[-s] sect] name ... Usage: man [-C file] -f command ... Usage: man [-C file] -k keyword ... Usage: man -p
We hit this with OSX, FreeBSD, and other BSD variants before but our is_bsd() helper function didn't recognize NetBSD. Caught thanks to Thomas. --- stem/util/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/stem/util/system.py b/stem/util/system.py index 4bfde995..3c03bc46 100644 --- a/stem/util/system.py +++ b/stem/util/system.py @@ -358,7 +358,7 @@ def is_bsd(): :returns: **bool** to indicate if we're on a BSD OS """
- return platform.system() in ('Darwin', 'FreeBSD', 'OpenBSD') + return platform.system() in ('Darwin', 'FreeBSD', 'OpenBSD', 'NetBSD')
def is_available(command, cached=True):
tor-commits@lists.torproject.org