KeyError: 'APPDATA' in mRemoteNG.py", line 181, in get_configuration_files
muelli opened this issue · comments
PS C:\temp> .\LaZagne.exe all
[920] Failed to execute script laZagne
Traceback (most recent call last):
File "laZagne.py", line 24, in <module>
File "lazagne\config\run.py", line 32, in create_module_dic
File "lazagne\config\manage_modules.py", line 102, in get_modules
File "lazagne\config\manage_modules.py", line 102, in <listcomp>
File "lazagne\softwares\sysadmin\mRemoteNG.py", line 35, in __init__
File "lazagne\softwares\sysadmin\mRemoteNG.py", line 181, in get_configuration_files
File "os.py", line 679, in __getitem__
KeyError: 'APPDATA'
PS C:\temp>
it should probably fall back to a safe default when the environment variable does not exist.
Hello,
Thanks for reporting this problem. I didn't check it but the rest of the tools does it. Here is how these env variables are defined:
And here is how it is used ont other modules:
I will fix it when I have some time.
Why not create a try catch in it? Or you could use it more. If something fail, it don't need to block all the program.