15
0
Files
python-napalm-asa/py23_compat.patch
Matej Cepl 957d1a2c36 - Update to version 20180525.8c54a85:
* Version bump
  * Implement token auth (#17)
  * Add built status and pypi version to README
  * PY3 compatibility for tests
  * Fix style and add optinal_args protection against falsy value
  * Add .travis.yaml
  * Support for rest-api agents that run on non-standard tcp port. (#14)
  * Clean up after replacing url2libe with requests
  * Removing pylama.ini
  * Replace urllib2 with requests
- Add napalm-py23_compat.patch to fix missing py23_compat.py file
  (gh#napalm-automation-community/napalm-asa#35).
- Add pylama.patch to fix two problems discovered by pylama
  (gh#napalm-automation-community/napalm-asa#36).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-napalm-asa?expand=0&rev=11
2023-01-05 17:39:29 +00:00

42 lines
1.4 KiB
Diff

---
napalm_asa/asa.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/napalm_asa/asa.py
+++ b/napalm_asa/asa.py
@@ -30,7 +30,6 @@ from collections import OrderedDict
from netaddr import IPNetwork
from napalm.base import NetworkDriver
-from napalm.base.utils import py23_compat
from napalm.base.exceptions import (
ConnectionException,
CommandErrorException,
@@ -70,7 +69,7 @@ class RespFetcherHttps:
else:
return (False, token_request.status_code)
except requests.exceptions.RequestException as e:
- raise ConnectionException(py23_compat.text_type(e))
+ raise ConnectionException(str(e))
def delete_token(self):
"""Delete auth token."""
@@ -85,7 +84,7 @@ class RespFetcherHttps:
else:
return (False, token_delete_request.status_code)
except requests.exceptions.RequestException as e:
- raise ConnectionException(py23_compat.text_type(e))
+ raise ConnectionException(str(e))
def get_resp(self, endpoint="", data=None):
"""Get response from device and returne parsed json."""
@@ -103,7 +102,7 @@ class RespFetcherHttps:
return f.json()
except requests.exceptions.RequestException as e:
- raise ConnectionException(py23_compat.text_type(e))
+ raise ConnectionException(str(e))
class ASADriver(NetworkDriver):