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
def collect_files(log, basedir = "/home"):
f = open(log, 'r')
rx = re.compile(r"^Wrote: (%s.*\.rpm)$" % basedir)
- proc = re.compile(r"^Processing (files):.*$")
+ proc = re.compile(r"^Processing files:.*$")
files = []
- for l in reversed(list(f.xreadlines())):
+ for l in reversed(list(f)):
if proc.match(l):
break
m = rx.search(l)