Skip to content

Commit

Permalink
Fix config passing to ngstk
Browse files Browse the repository at this point in the history
  • Loading branch information
sheffien committed Jan 29, 2016
1 parent ed5fc8f commit afacd2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pypiper/pypiper.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def __init__(
# Handle config file if it exists

# Read YAML config file
# TODO: This section should become a function, so toolkits can use it
# to locate a config file.
config_to_load = None # start with nothing

if args and args.config_file is not None:
Expand All @@ -117,6 +119,9 @@ def __init__(
# Finally load the config we found.
if config_to_load is not None:
with open(config_to_load, 'r') as config_file:
# Set the args to the new config file, so it can be used
# later to pass to, for example, toolkits
args.config_file = config_to_load
import yaml
config = yaml.load(config_file)
self.config = AttributeDict(config, default=True)
Expand Down

0 comments on commit afacd2d

Please sign in to comment.