use args.project_name to prevent conflicting with project argument

This commit is contained in:
Alan Hamlett 2014-05-06 17:16:35 -07:00
parent 81c3e6d336
commit 96899ed46b

View file

@ -148,7 +148,7 @@ def parseArguments(argv):
parser.add_argument('--plugin', dest='plugin',
help='optional text editor plugin name and version '+
'for User-Agent header')
parser.add_argument('--project', dest='project',
parser.add_argument('--project', dest='project_name',
help='optional project name; will auto-discover by default')
parser.add_argument('--key', dest='key',
help='your wakatime api key; uses api_key from '+
@ -310,12 +310,12 @@ def main(argv=None):
stats = get_file_stats(args.targetFile)
project = args.project or find_project(args.targetFile, configs=configs)
project = find_project(args.targetFile, configs=configs)
branch = None
project_name = None
if project:
branch = project.branch()
project_name = project.name()
project_name = args.project_name or project.name()
if send_action(
project=project_name,