Skip to content

Commit 5b10ec5

Browse files
committed
We now encode to UTF8 rather than ASCII (lingering fix).
1 parent c66ca36 commit 5b10ec5

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

gdrivefs/gdtool/normal_entry.py

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,21 +204,26 @@ def __convert(self, data):
204204
return data
205205

206206
def get_data(self):
207-
original = dict([(key.encode('ASCII'), value)
208-
for key, value
209-
in self.__raw_data.iteritems()])
207+
original = {
208+
key.encode('utf8'): value
209+
for key, value
210+
in self.__raw_data.iteritems()
211+
}
210212

211-
distilled = self.__info
213+
distilled = self.__info
212214

213-
extra = dict([(key, getattr(self, key))
214-
for key
215-
in self.__properties_extra])
215+
extra = {
216+
key: getattr(self, key)
217+
for key
218+
in self.__properties_extra
219+
}
216220

217-
data_dict = {'original': original,
218-
#'distilled': distilled,
219-
'extra': extra}
221+
data_dict = {
222+
'original': original,
223+
'extra': extra,
224+
}
220225

221-
return data_dict
226+
return data_dict
222227

223228
@property
224229
def xattr_data(self):
@@ -227,7 +232,6 @@ def xattr_data(self):
227232

228233
attrs = {}
229234
for a_type, a_dict in data_dict.iteritems():
230-
# self.__log.debug("Setting [%s]." % (a_type))
231235
for key, value in a_dict.iteritems():
232236
fqkey = ('user.%s.%s' % (a_type, key))
233237
attrs[fqkey] = self.__convert(value)

0 commit comments

Comments
 (0)