(cardFile, lines, offlineSource=True)
| 100 | |
| 101 | |
| 102 | def hasOracleLine(cardFile, lines, offlineSource=True): |
| 103 | # Start parsing the rest of the data file |
| 104 | hasOracle = False |
| 105 | |
| 106 | for line in cardFile.readlines(): |
| 107 | line = line.strip() |
| 108 | # Skip empty lines |
| 109 | if line == '': |
| 110 | continue |
| 111 | |
| 112 | if line.find(oracleStr) != -1: |
| 113 | hasOracle = True |
| 114 | break |
| 115 | |
| 116 | else: |
| 117 | lines += line + '\n' |
| 118 | |
| 119 | cardFile.close() |
| 120 | return hasOracle, lines |
| 121 | |
| 122 | # parse cardsfolder for Card Lines and Rarity/Picture SVars. Filling in any gaps |
| 123 | for root, dirnames, filenames in os.walk(folder): |
no test coverage detected