Skip to content

Commit

Permalink
Python2 string handling stucks! 😡
Browse files Browse the repository at this point in the history
  • Loading branch information
road-cycling committed Nov 14, 2019
1 parent ef1aad5 commit 3b46bb4
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,14 @@ def get_interface_name(self, interface_index):
def get_alias(self, interface_index):
return self.enrichment.get_enrichment_value(u'self', u'interface', interface_index) \
.get(u'alias') \
.encode(u'ascii', u'ignore')
.encode(u'ascii', u'ignore') \
.decode(u'ascii')

def get_description(self, interface_index):
return self.enrichment.get_enrichment_value(u'self', u'interface', interface_index) \
.get(u'description') \
.encode(u'ascii', u'ignore')
.encode(u'ascii', u'ignore') \
.decode(u'ascii')

def get_media_type(self, interface_index):
return self.enrichment.get_enrichment_value(u'self', u'interface', interface_index).get(u'media_type')
Expand Down

0 comments on commit 3b46bb4

Please sign in to comment.