corpnewt / GenSMBIOS

Py script that uses acidanthera's macserial to generate SMBIOS and optionally saves them to a plist.
MIT License
1.59k stars 234 forks source link

_get_binary using list() without proper initialization #15

Closed trollspank closed 4 years ago

trollspank commented 4 years ago

Hey folks,

I noticed "macserial" can never be found (at least on most recent python 2, and python3) installs because of the use of of () instead of [] to build a list of one element ["macserial"]

If on line 68 you update it to binary_name = ["macserial.exe","macserial32.exe"] if os.name == "nt" else ["macserial"] you'll be able to make this work.

Also, to note, I did not "test" the windows path, only the mac path (as I only have macs)

corpnewt commented 4 years ago

Thanks for catching this - I had tested the Windows detection, but not Linux/macOS. I've updated the code and pushed the changes.

-CorpNewt

trollspank commented 4 years ago

Awesome thanks, yeah we have all macs except for one PC hackintosh. Thanks for pushing I tried to open a PR but didn’t have rights but the fix was simple enough to explain.

Thanks again