# Our modules
from patman import control
from patman import func_test
-from patman import gitutil
from patman import project
from patman import settings
from patman import terminal
argv = sys.argv[1:]
args, rest = parser.parse_known_args(argv)
if hasattr(args, 'project'):
- settings.Setup(gitutil, parser, args.project, '')
+ settings.Setup(parser, args.project, '')
args, rest = parser.parse_known_args(argv)
# If we have a command, it is safe to parse all arguments
import os
import re
+from patman import gitutil
+
"""Default settings per-project.
These are used by _ProjectConfigParser. Settings names should match
fd.close()
-def CreatePatmanConfigFile(gitutil, config_fname):
+def CreatePatmanConfigFile(config_fname):
"""Creates a config file under $(HOME)/.patman if it can't find one.
Args:
return []
-def Setup(gitutil, parser, project_name, config_fname=''):
+def Setup(parser, project_name, config_fname=''):
"""Set up the settings module by reading config files.
Args:
if not os.path.exists(config_fname):
print("No config file found ~/.patman\nCreating one...\n")
- CreatePatmanConfigFile(gitutil, config_fname)
+ CreatePatmanConfigFile(config_fname)
config.read(config_fname)