Changeset 0e576fc in flex_extract.git for source/python/classes/MarsRetrieval.py


Ignore:
Timestamp:
Oct 8, 2018, 3:44:58 PM (16 months ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
dev
Children:
0aaeb04
Parents:
ae88f7d
Message:

implemented extraction possibility of EA5 und CERA

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/python/classes/MarsRetrieval.py

    r5bad6ec r0e576fc  
    463463        # find all keys without a value and convert all other values to strings
    464464        empty_keys = []
    465         for key, value in attrs.itteritems():
     465        for key, value in attrs.iteritems():
    466466            if value == '':
    467467                empty_keys.append(str(key))
     
    486486                print("ERROR: ", e)
    487487                print('MARS Request failed!')
    488             if not self.public and os.stat(target).st_size == 0:
    489                 print('MARS Request returned no data - please check request')
    490                 raise IOError
    491             elif self.public and os.stat(target).st_size == 0:
    492                 print('Public MARS Request returned no data - '
    493                       'please check request')
    494                 raise IOError
    495             else:
    496                 raise IOError
     488                if not self.public and os.stat(target).st_size == 0:
     489                    print('MARS Request returned no data - '
     490                          'please check request')
     491                    raise IOError
     492                elif self.public and os.stat(target).st_size == 0:
     493                    print('Public MARS Request returned no data - '
     494                          'please check request')
     495                    raise IOError
     496                else:
     497                    raise IOError
    497498        # MARS request via extra process in shell
    498499        else:
     
    515516                print('MARS Request returned no data - please check request')
    516517                raise IOError
    517             else:
    518                 raise
    519518
    520519        return
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG