(string, fitName=None)
| 41 | |
| 42 | |
| 43 | def importDna(string, fitName=None): |
| 44 | sMkt = Market.getInstance() |
| 45 | ids = list(map(int, re.findall(r'\d+', string))) |
| 46 | for id_ in ids: |
| 47 | try: |
| 48 | try: |
| 49 | Ship(sMkt.getItem(id_)) |
| 50 | except ValueError: |
| 51 | Citadel(sMkt.getItem(id_)) |
| 52 | string = string[string.index(str(id_)):] |
| 53 | break |
| 54 | except (KeyboardInterrupt, SystemExit): |
| 55 | raise |
| 56 | except: |
| 57 | pyfalog.warning("Exception caught in importDna") |
| 58 | pass |
| 59 | string = string[:string.index("::") + 2] |
| 60 | info = string.split(":") |
| 61 | return processImportInfo(info, fitName, ";") |
| 62 | |
| 63 | def importDnaAlt(string, fitName=None): |
| 64 | sMkt = Market.getInstance() |
no test coverage detected