Changeset a9c7f3e in flex_extract.git for python/FlexpartTools.py
- Timestamp:
- Nov 26, 2018, 3:36:38 PM (5 years ago)
- Branches:
- master, ctbto, dev
- Children:
- fb8810c
- Parents:
- ceea034
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/FlexpartTools.py
r51f9853 ra9c7f3e 197 197 198 198 if c.request != '0': 199 marsfile = os.path.join(c.inputdir, 'mars_request .csv')199 marsfile = os.path.join(c.inputdir, 'mars_requests.csv') 200 200 if os.path.isfile(marsfile): 201 201 os.remove(marsfile) … … 578 578 if not hasattr(self,'request'): 579 579 self.request='0' 580 elif self.request != 0: 581 marsfile = os.path.join(self.inputdir, 582 'mars_requests.csv') 583 if os.path.isfile(marsfile): 584 silentremove(marsfile) 580 585 581 586 return … … 675 680 676 681 # Get all class attributes and their values as a dictionary 677 attrs = vars(self) 682 attrs = vars(self).copy() 678 683 del attrs['server'] 684 del attrs['public'] 679 685 680 686 # open a file to store all requests to 681 with open(os.path.join(inputdir, 'mars_request .csv'), 'a') as f:687 with open(os.path.join(inputdir, 'mars_requests.csv'), 'a') as f: 682 688 f.write(str(request_number) + ', ') 683 689 f.write(', '.join(str(attrs[key]) … … 1475 1481 for k in l: 1476 1482 key_vals.append(str(k)) 1477 1478 index_vals.append(key_vals)1483 1484 index_vals.append(key_vals) 1479 1485 1480 1486
Note: See TracChangeset
for help on using the changeset viewer.