Skip to content

Commit

Permalink
Fixed bug editing multiple sources
Browse files Browse the repository at this point in the history
  • Loading branch information
jschultz committed Dec 13, 2017
1 parent f96b961 commit d950a03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editSource.py
Expand Up @@ -162,6 +162,7 @@ def editSource(outfile, infile, user,
'ModifiedDate': datetimeNow
})

sourceRows = []
for infilepattern in infile:
for infilename in glob.glob(infilepattern):
if verbosity >= 2:
Expand All @@ -187,7 +188,6 @@ def editSource(outfile, infile, user,
logfile.write(incomments)

csvreader=unicodecsv.DictReader(csvFile, fieldnames=csvfieldnames)
sourceRows = []
for row in csvreader:
sourceRow = dict(row)
sourceRow['Name'] = sourceRow.get('Name', name)
Expand All @@ -201,13 +201,13 @@ def editSource(outfile, infile, user,
break

else:
sourceRows = [{
sourceRows.append({
'Name': name or infilebasename,
'Description': description or u"Created by NVivotools http://barraqda.org/nvivotools/",
'Category': category,
'Color': color,
'ObjectFile': infilename,
}]
})

if not infile:
sourceRows = [{
Expand Down

0 comments on commit d950a03

Please sign in to comment.