joseluis / huion-linux-drivers

Linux user-space drivers for Huion Graphic Tablets
MIT License
168 stars 95 forks source link

Replace ast.literal_eval with eval #13

Closed Gijsjan closed 5 years ago

Gijsjan commented 5 years ago

The script errored on me here. I believe ast.literal_eval breaks on the + operator, which eval does not. There are more ast.literal_eval calls, they didn't break on me, but I have not used all monitor setups, so a thorough check on all of them would be in order. I am not a Python dev so please review this change carefully.

joseluis commented 5 years ago

I don't think it's the + operator that produces the error. It works for me with the [monitor_2] section, which has total_screen_width = ${screen_1W} + ${screen_2W}.

And I prefer not to use full evals if I can help it.

If it still fails for you using the latest version of the script, please open an issue and we'll investigate it.