seveas / python-networkmanager

Easy communication with NetworkManager
http://packages.python.org/python-networkmanager/
Other
163 stars 90 forks source link

Fix for Issue 68 - device_class default return value #79

Closed calebstewart closed 3 years ago

calebstewart commented 4 years ago

It appears that some devices do not have a device type that python-networkmanager understands. The old code would cause exceptions and refuse to run if you had such a device on your system. I simply changed the lookup for device types to return a "Generic" device in the event that the type was unknown.

calebstewart commented 4 years ago

As a note, I only modified one line. However, Python Black runs automatically and appears to have made a lot of changes. Python Black does not change the functionality of code, and only formats it properly. For ease of analysis, I changed line 537 in the new file which equates to line 393 in the old version.

alex-eri commented 4 years ago

patch must contain only changes for one issue. code refactoring must be on separate path.

seveas commented 3 years ago

Sorry, I can't take this as is. As @alex-eri says, please limit patches to the functionality you want to change, and not needless formatting changes.