import sys
import yaml


def job_config(args):
	try:
		config_file = './config/{0}.yml'.format(args[0])
	except IndexError:
		sys.exit("Job name is a required argument. Example: chicago_cta")

	try:
		with open(config_file, 'r') as file:
			config = yaml.safe_load(file)
	except IOError:
		sys.exit("Missing config file for job: '{0}'".format(config_file))

	return config, config_file

import sys
import yaml


def main_config():
	config_file = './config/.main.yml'

	try:
		with open(config_file, 'r') as file:
			config = yaml.safe_load(file)
	except IOError:
		sys.exit("Missing main config file: '{0}'".format(config_file))

	return config, config_file


def job_config(args):
	try:
		config_file = './config/{0}.yml'.format(args[0])
	except IndexError:
		sys.exit("Job name is a required argument. Example: chicago_cta")

	try:
		with open(config_file, 'r') as file:
			config = yaml.safe_load(file)
	except IOError:
		sys.exit("Missing config file for job: '{0}'".format(config_file))

	return config, config_file

Add util for loading main config
Add util for loading main config

  import sys
  import yaml
+ 
+ 
+ def main_config():
+ 	config_file = './config/.main.yml'
+ 
+ 	try:
+ 		with open(config_file, 'r') as file:
+ 			config = yaml.safe_load(file)
+ 	except IOError:
+ 		sys.exit("Missing main config file: '{0}'".format(config_file))
+ 
+ 	return config, config_file
  
  
  def job_config(args):
  	try:
  		config_file = './config/{0}.yml'.format(args[0])
  	except IndexError:
  		sys.exit("Job name is a required argument. Example: chicago_cta")
  
  	try:
  		with open(config_file, 'r') as file:
  			config = yaml.safe_load(file)
  	except IOError:
  		sys.exit("Missing config file for job: '{0}'".format(config_file))
  
  	return config, config_file
  
Add util for loading main config
## Code Before:
import sys
import yaml


def job_config(args):
	try:
		config_file = './config/{0}.yml'.format(args[0])
	except IndexError:
		sys.exit("Job name is a required argument. Example: chicago_cta")

	try:
		with open(config_file, 'r') as file:
			config = yaml.safe_load(file)
	except IOError:
		sys.exit("Missing config file for job: '{0}'".format(config_file))

	return config, config_file

## Instruction:
Add util for loading main config
## Code After:
import sys
import yaml


def main_config():
	config_file = './config/.main.yml'

	try:
		with open(config_file, 'r') as file:
			config = yaml.safe_load(file)
	except IOError:
		sys.exit("Missing main config file: '{0}'".format(config_file))

	return config, config_file


def job_config(args):
	try:
		config_file = './config/{0}.yml'.format(args[0])
	except IndexError:
		sys.exit("Job name is a required argument. Example: chicago_cta")

	try:
		with open(config_file, 'r') as file:
			config = yaml.safe_load(file)
	except IOError:
		sys.exit("Missing config file for job: '{0}'".format(config_file))

	return config, config_file
