Skip to content

Commit

Permalink
After #50 no need to check if need to add record
Browse files Browse the repository at this point in the history
  • Loading branch information
karimbahgat committed Sep 24, 2016
1 parent c770484 commit 7d3e6b9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions shapefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ def record(self, *recordList, **recordDict):
# Compensate for deletion flag
if self.fields[0][0].startswith("Deletion"): fieldCount -= 1
if recordList:
[record.append(recordList[i]) for i in range(fieldCount)]
record = [recordList[i] for i in range(fieldCount)]
elif recordDict:
for field in self.fields:
if field[0] in recordDict:
Expand All @@ -1044,8 +1044,7 @@ def record(self, *recordList, **recordDict):
else:
# Blank fields for empty record
record = ["" for i in range(fieldCount)]
if record:
self.records.append(record)
self.records.append(record)

def shape(self, i):
return self._shapes[i]
Expand Down

0 comments on commit 7d3e6b9

Please sign in to comment.