Change the way DNA import is handled
This commit is contained in:
@@ -231,11 +231,16 @@ class Port(object):
|
|||||||
if re.match("\[.*,.*\]", firstLine):
|
if re.match("\[.*,.*\]", firstLine):
|
||||||
return "EFT", (cls.importEft(string),)
|
return "EFT", (cls.importEft(string),)
|
||||||
|
|
||||||
|
# Check if string is in DNA format
|
||||||
|
if re.match("\d+(:\d+(;\d+))*::", firstLine):
|
||||||
|
return "DNA", (cls.importDna(string),)
|
||||||
|
|
||||||
|
# Assume that we import stand-alone abyssal module if all else fails
|
||||||
try:
|
try:
|
||||||
return "Abyssal", (parseMutant(string.split("\n")),)
|
return "Abyssal", (parseMutant(string.split("\n")),)
|
||||||
except:
|
except:
|
||||||
# Use DNA format for all other cases
|
pass
|
||||||
return "DNA", (cls.importDna(string),)
|
|
||||||
|
|
||||||
# EFT-related methods
|
# EFT-related methods
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user