Skip to content

Commit d3b622c

Browse files
committed
bugfix - try with "Data from station" str search
1 parent defe49e commit d3b622c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/pypromice/tx/tx.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,14 +454,15 @@ def getFormat(self):
454454
bool
455455
Valid format flag
456456
'''
457-
458-
st_names_gios = ['Watson','GIOS','WAT_BR','WAT_R','RUS_R','LRU']
459-
457+
460458
if self.getFirstByte().isdigit() or (self.payload[:2] == '\n' and self.imei == 300234064121930): #TODO needed?
461459
return None, None, None, None, -9999, False
462460

463-
elif any(st in self.email_data['subject'] for st in st_names_gios):
464-
return None, None, None, None, -9999, False
461+
elif self.email_data['subject'].startswith("Data from station"):
462+
return None, None, None, None, -9999, False
463+
464+
elif 'watson' in self.email_data['subject'].lower() or 'gios' in self.email_data['subject'].lower():
465+
return None, None, None, None, -9999, False
465466

466467
else:
467468
bidx = ord(self.getFirstByte())

0 commit comments

Comments
 (0)