comparison msnc_tools.py @ 6:baf9f5eef128 draft

"planemo upload for repository https://github.com/rolfverberg/galaxytools commit 47f763393ddfbfa788158e789ed3814f45e0aeee"
author rv43
date Wed, 06 Apr 2022 19:48:22 +0000
parents f9c52762c32c
children 845270a96464
comparison
equal deleted inserted replaced
5:4646c4b174be 6:baf9f5eef128
617 617
618 # Ensure config file exists 618 # Ensure config file exists
619 if not os.path.isfile(config_file): 619 if not os.path.isfile(config_file):
620 logging.error(f'Unable to load {config_file}') 620 logging.error(f'Unable to load {config_file}')
621 return 621 return
622 print(f'\nLoading {config_file}\n')
622 623
623 # Load config file 624 # Load config file
624 self.suffix = os.path.splitext(config_file)[1] 625 self.suffix = os.path.splitext(config_file)[1]
625 if self.suffix == '.yml' or self.suffix == '.yaml': 626 if self.suffix == '.yml' or self.suffix == '.yaml' or self.suffix == '.dat':
626 with open(config_file, 'r') as f: 627 with open(config_file, 'r') as f:
627 self.config = yaml.safe_load(f) 628 self.config = yaml.safe_load(f)
628 elif self.suffix == '.txt': 629 elif self.suffix == '.txt':
629 with open(config_file, 'r') as f: 630 with open(config_file, 'r') as f:
630 lines = f.read().splitlines() 631 lines = f.read().splitlines()