Changeset 70fee58 in flex_extract.git for source/python/classes/ControlFile.py


Ignore:
Timestamp:
Oct 12, 2018, 1:17:12 PM (6 years ago)
Author:
Anne Philipp <anne.philipp@…>
Branches:
master, ctbto, dev
Children:
785b882
Parents:
5827ff6
Message:

some bug corrections, minor code improvements

File:
1 edited

Legend:

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

    r0e576fc r70fee58  
    6060sys.path.append('../')
    6161import _config
    62 from mods.tools import my_error
     62from mods.tools import my_error, silent_remove
    6363
    6464# ------------------------------------------------------------------------------
     
    188188
    189189        try:
    190             with open(os.path.join(_config.PATH_CONTROLFILES,
    191                                    self.controlfile)) as f:
     190            cfile = os.path.join(_config.PATH_CONTROLFILES, self.controlfile)
     191            with open(cfile) as f:
    192192                fdata = f.read().split('\n')
    193193        except IOError:
    194             print('Could not read CONTROL file "' + args.controlfile + '"')
     194            print('Could not read CONTROL file "' + cfile + '"')
    195195            print('Either it does not exist or its syntax is wrong.')
    196196            print('Try "' + sys.argv[0].split('/')[-1] + \
     
    450450                self.mailops = [self.mailops]
    451451
    452         if queue in ['ecgate', 'cca'] and \
     452        if queue in _config.QUEUES_LIST and \
    453453           not self.gateway or not self.destination or \
    454454           not self.ecuid or not self.ecgid:
     
    463463                                    _config.FILE_MARS_REQUESTS)
    464464            if os.path.isfile(marsfile):
    465                 os.remove(marsfile)
     465                silent_remove(marsfile)
    466466
    467467        # check all logical variables for data type
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG