aboutsummaryrefslogtreecommitdiff
path: root/src/usr/bin/logout-manager-cli
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-04-03 08:43:52 -0400
committerB Stack <bgstack15@gmail.com>2020-04-03 08:43:52 -0400
commit03a6e58ff8754567fc8b6daca10fe241935572ba (patch)
tree87d810a4293c592b86bbbae6fb679cca37cbd201 /src/usr/bin/logout-manager-cli
parentactually apply those fixes (diff)
downloadlogout-manager-03a6e58ff8754567fc8b6daca10fe241935572ba.tar.gz
logout-manager-03a6e58ff8754567fc8b6daca10fe241935572ba.tar.bz2
logout-manager-03a6e58ff8754567fc8b6daca10fe241935572ba.zip
fix #4 fix rest of frontends for py3.8 distro
Diffstat (limited to 'src/usr/bin/logout-manager-cli')
-rwxr-xr-xsrc/usr/bin/logout-manager-cli8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/usr/bin/logout-manager-cli b/src/usr/bin/logout-manager-cli
index fde7d55..c325db4 100755
--- a/src/usr/bin/logout-manager-cli
+++ b/src/usr/bin/logout-manager-cli
@@ -13,16 +13,17 @@
# https://stackoverflow.com/questions/3061/calling-a-function-of-a-module-by-using-its-name-a-string/12025554#12025554
# Improve:
# Dependencies:
-# Devuan: python3-dotenv python3
+# dep-devuan: python3-dotenv, python3
# Documentation:
-import os, platform, sys, argparse
+import os, sys, argparse
+from distro import linux_distribution
from dotenv import load_dotenv
# all this to load the libpath
try:
defaultdir="/etc/sysconfig"
- thisplatform = platform.platform().lower()
+ thisplatform = linux_distribution()[0].lower()
if 'debian' in thisplatform or 'devuan' in thisplatform:
defaultdir="/etc/default"
# load_dotenv keeps existing environment variables as higher precedent
@@ -32,6 +33,7 @@ except:
if 'LOGOUT_MANAGER_LIBPATH' in os.environ:
for i in os.environ['LOGOUT_MANAGER_LIBPATH'].split(":"):
sys.path.append(i)
+sys.path.append("/usr/share/logout-manager")
import lmlib
def eprint(*args, **kwargs):
bgstack15