def uuid_external():
f = os.popen("uuidgen 2>&1")
- u = string.strip(f.read())
+ u = f.read().strip()
f.close()
if len(u) != 36:
- raise Exception, "uuid: fatal, cannot generate uuid: %s" % u
+ raise Exception("uuid: fatal, cannot generate uuid: %s" % u)
return u
# uuid module available in python >= 2.5