Len-Stevens/Python-Antivirus

OS checking

Opened this issue · 1 comments

As bought up in #6 we have some issues with .ico files being windows specific. On top of that, running the code on arch gives this issue:

Traceback (most recent call last):
  File "Antivirus.py", line 406, in <module>
    ui.setupUi(MainWindow)
  File "/home/Python-Antivirus/scripts/window.py", line 320, in setupUi
    VirustotalScan = config.get('-settings-', 'VirusTotalScan')
  File "/usr/lib/python3.8/configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "/usr/lib/python3.8/configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: '-settings-'

which I suspect might be operating system specific. We should definitely consider some checks to avoid issues like these.

This can be done with the platform module using platform.system()

alr fixed I´m currently uploading it.