Skip to content

Commit

Permalink
* handle python 3!
Browse files Browse the repository at this point in the history
  • Loading branch information
jayzeng committed Sep 11, 2016
1 parent 2540908 commit 8aa92f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scrapyelasticsearch/scrapyelasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def from_crawler(cls, crawler):

def get_unique_key(self, unique_key):
if isinstance(unique_key, list):
unique_key = unique_key[0]
unique_key = unique_key[0].encode('utf-8')
elif not isinstance(unique_key, str):
raise Exception('unique key must be str')

Expand Down

0 comments on commit 8aa92f6

Please sign in to comment.