0

Make sure that regionset.type always has a value

This commit is contained in:
Andrew Chin
2013-01-31 16:39:10 -05:00
parent c5e4140bf5
commit 40becc9f59

View File

@@ -252,9 +252,12 @@ class RegionSet(object):
# we want to get rid of /regions, if it exists # we want to get rid of /regions, if it exists
if self.rel.endswith(os.path.normpath("/region")): if self.rel.endswith(os.path.normpath("/region")):
self.type = self.rel[0:-len(os.path.normpath("/region"))] self.type = self.rel[0:-len(os.path.normpath("/region"))]
if self.rel == "region": elif self.rel == "region":
# this is the main world # this is the main world
self.type = None self.type = None
else:
logging.warning("Unkown region type in %r", regiondir)
self.type = "__unknown"
logging.debug("Scanning regions") logging.debug("Scanning regions")