Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

py23_compat has been removed but it is still used in tests #35

Open
mcepl opened this issue Jan 5, 2023 · 0 comments
Open

py23_compat has been removed but it is still used in tests #35

mcepl opened this issue Jan 5, 2023 · 0 comments

Comments

@mcepl
Copy link

mcepl commented Jan 5, 2023

This patch needs to be applied:

---
 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):
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Jan 8, 2023
…056866

https://build.opensuse.org/request/show/1056866
by user mcepl + dimstar_suse
- 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).
- Switch to git checkout version (releases are significantly
  lagging).
- Update to version 20211220.27ac4ce:
  * get_interfaces added
  *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant