Skip to content
This repository was archived by the owner on Feb 10, 2018. It is now read-only.

Commit

Permalink
Fix encoding issue that causes PY3 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ktbyers committed Dec 27, 2016
1 parent 8720180 commit a527a12
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions napalm_junos/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1372,13 +1372,16 @@ def get_config(self, retrieve='all'):

if retrieve in ('candidate', 'all'):
config = self.device.rpc.get_config(filter_xml=None, options=options)
rv['candidate'] = py23_compat.text_type(config.text.encode('ascii', 'replace'))
rv['candidate'] = py23_compat.text_type(config.text)
# rv['candidate'] = py23_compat.text_type(config.text.encode('ascii', 'replace'))

if retrieve in ('running', 'all'):
options['database'] = 'committed'
config = self.device.rpc.get_config(filter_xml=None, options=options)
rv['running'] = py23_compat.text_type(config.text.encode('ascii', 'replace'))
rv['running'] = py23_compat.text_type(config.text)
# rv['running'] = py23_compat.text_type(config.text.encode('ascii', 'replace'))

print(rv)
return rv

def get_network_instances(self, name=''):
Expand Down

0 comments on commit a527a12

Please sign in to comment.