Initialize utf_content
This commit is contained in:
parent
30630c46fc
commit
cf21a319f5
1 changed files with 2 additions and 0 deletions
|
|
@ -52,6 +52,7 @@ class GoogleFile(object):
|
||||||
create_params = {}
|
create_params = {}
|
||||||
|
|
||||||
if content:
|
if content:
|
||||||
|
utf_content = content
|
||||||
try:
|
try:
|
||||||
utf_content = content.encode('utf-8')
|
utf_content = content.encode('utf-8')
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
|
@ -217,6 +218,7 @@ class GoogleFile(object):
|
||||||
params = {}
|
params = {}
|
||||||
|
|
||||||
if content:
|
if content:
|
||||||
|
utf_content = content
|
||||||
try:
|
try:
|
||||||
utf_content = content.encode('utf-8')
|
utf_content = content.encode('utf-8')
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue