# the 2nd of which is the serial number
return data.strip('\x00').split()[1]
-except ImportError, e:
- print >>sys.stderr, "hdquery requires py_sg"
+except ImportError as e:
+ print("hdquery requires py_sg", file=sys.stderr)
def get_hd_serial_num(device):
raise NotImplemented('get_hd_serial_num is not available for anything other than linux')