Add comments and fix Artix Linux

This commit is contained in:
Theelgirl 2020-10-15 20:07:09 +00:00 committed by GitHub
parent fadffdf182
commit 1c04aea5a0
1 changed files with 12 additions and 3 deletions

View File

@ -1,10 +1,19 @@
import sys
import platform
running_os = platform.system()
if running_os.lower() in ('linux', 'darwin'):
import distro # to check linux distributions
try:
linux_distro = distro.linux_distribution()[0].lower()
except:
linux_distro = "n/a"
# fvid
if platform.system().lower() in ('linux', 'darwin') and linux_distro not in ('artix linux',):
# this used to work for every distro but something changed in the Cython/Password PR
from fvid import main
else:
# windows and artix linux need this because of something in the Cython/Password PR, unknown if more OSes need it
from fvid.fvid import main
if __name__ == '__main__':
sys.exit(main())
sys.exit(main())