actually raises IOError. Also, treat a missing SLOT
file as SLOT="" since it is currently possible to
install an ebuild with an undefined SLOT even though
repoman generates a SLOT.missing error with such an
ebuild. (trunk r8174)
svn path=/main/branches/2.1.2/; revision=8175
return 1
inforoot_slot_file = os.path.join(inforoot, "SLOT")
+ slot = None
try:
f = open(inforoot_slot_file)
try:
slot = f.read().strip()
finally:
f.close()
- except OSError, e:
- writemsg("!!! Error reading '%s': %s\n" % (inforoot_slot_file, e),
- noiselevel=-1)
- return 1
+ except EnvironmentError, e:
+ if e.errno != errno.ENOENT:
+ raise
+ del e
+
+ if slot is None:
+ slot = ""
if slot != self.settings["SLOT"]:
writemsg("!!! WARNING: Expected SLOT='%s', got '%s'\n" % \