Since I do not have the reputation to comment yet, I would like to add that (at least) in my case the python code line in the (otherwise excellent) first answer
print("Hard Disk Model: %s" % model)
outputs a bytes object rather than a regular Unicode string; you might want to re-write this (and the following) line as
print(f"Hard Disk Model: {model.decode('utf-8')}")
Second, if called by a non-existant drive, an OSError 22 ("Invalid argument") is thrown when calling fcntl.ioctl. You might want to embed that part of the code in try/except.