Handle empty courses list
An empty courses list (or in this case, a Digicampus server error) causes the following crash:
Traceback (most recent call last):
File "C:\Users\felix\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\Scripts\cybercampus-script.py", line 33, in <module>
sys.exit(load_entry_point('cybercampus==0.6', 'console_scripts', 'cybercampus')())
File "C:\Users\felix\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\cybercampus-0.6-py3.8.egg\cybercampus\scripts\__init__.py", line 40, in main
mod.main()
File "C:\Users\felix\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\cybercampus-0.6-py3.8.egg\cybercampus\scripts\list_courses.py", line 25, in main
for c in dc.list_courses():
File "C:\Users\felix\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\cybercampus-0.6-py3.8.egg\cybercampus\__init__.py", line 163, in list_courses
name = links[0].text.strip()
IndexError: list index out of range
cybercampus must handle this situation, report an empty courses list and if possible recognize server errors.