Changeset 6cda7c1 in flex_extract.git for source/python/classes/ControlFile.py


Ignore:
Timestamp:
Nov 27, 2018, 11:48:40 PM (5 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
b2e95c3
Parents:
2d56c04
Message:

moved check install coditions to install module

File:
1 edited

Legend:

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

    r2d56c04 r6cda7c1  
    504504        return
    505505
    506     def check_install_conditions(self):
    507         '''Checks a couple of necessary attributes and conditions
    508         for the installation such as if they exist and contain values.
    509         Otherwise set default values.
    510 
    511         Parameters
    512         ----------
    513 
    514         Return
    515         ------
    516 
    517         '''
    518 
    519         if self.install_target and \
    520            self.install_target not in ['local', 'ecgate', 'cca']:
    521             print('ERROR: unknown or missing installation target ')
    522             print('target: ', self.install_target)
    523             print('please specify correct installation target ' +
    524                   '(local | ecgate | cca)')
    525             print('use -h or --help for help')
    526             sys.exit(1)
    527 
    528         if self.install_target and self.install_target != 'local':
    529             if not self.ecgid or not self.ecuid or \
    530                not self.gateway or not self.destination:
    531                 print('Please enter your ECMWF user id and group id as well ' +
    532                       'as the \nname of the local gateway and the ectrans ' +
    533                       'destination ')
    534                 print('with command line options --ecuid --ecgid \
    535                        --gateway --destination')
    536                 print('Try "' + sys.argv[0].split('/')[-1] + \
    537                       ' -h" to print usage information')
    538                 print('Please consult ecaccess documentation or ECMWF user \
    539                        support for further details')
    540                 sys.exit(1)
    541 
    542             if not self.flexpart_root_scripts:
    543                 self.flexpart_root_scripts = '${HOME}'
    544             else:
    545                 self.flexpart_root_scripts = self.flexpart_root_scripts
    546         else: # local
    547             if not self.flexpart_root_scripts:
    548                 self.flexpart_root_scripts = _config.PATH_FLEXEXTRACT_DIR
    549 
    550         return
    551 
    552506    def to_list(self):
    553507        '''Just generates a list of strings containing the attributes and
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG