Skip to content

Commit

Permalink
Fix upload_sheet.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
nya3jp committed Oct 27, 2015
1 parent e875e42 commit a8c9979
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def read_file(name):
classifiers = [
'Development Status :: 5 - Production/Stable',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'License :: OSI Approved :: Apache Software License',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand Down
6 changes: 2 additions & 4 deletions tools/upload_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@

def load_sheet(path):
with open(path, 'rb') as f:
dialect = csv.Sniffer().sniff(f.read(1024))
f.seek(0)
reader = csv.reader(f, dialect)
reader = csv.reader(f)
return list(reader)


Expand All @@ -72,7 +70,7 @@ def upload_main(argv):
with spreadsheet[0] as worksheet:
for srow, trow in zip(sheet, worksheet):
for i, value in enumerate(srow):
trow[i] = value
trow[i] = value.decode('utf-8')

print spreadsheet.url

Expand Down

0 comments on commit a8c9979

Please sign in to comment.