Skip to content

Fix TypeError in compare_s, test and document error behavior #271

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

Merged
merged 2 commits into from
May 24, 2019

Conversation

tiran
Copy link
Member

@tiran tiran commented Mar 21, 2019

Fix string formatting in compare_ext_s

Pass (ldap_res,) tuple to string formatting instead of ldap_res.
This changes fixes TypeError: not all arguments converted during string formatting.

Fixes: #270

Test and document compare_s error cases

compare_s() may fail with an exception in case the DN is not found or the user searches for an unspecified attribute.

tiran added 2 commits March 21, 2019 12:27
Pass ``(ldap_res,)`` tuple to string formatting instead of ``ldap_res``.
This changes fixes ``TypeError: not all arguments converted during string
formatting``.

Fixes: python-ldap#270
Signed-off-by: Christian Heimes <cheimes@redhat.com>
compare_s() may fail with an exception in case the DN is not found or
the user searches for an unspecified attribute.

Signed-off-by: Christian Heimes <cheimes@redhat.com>
@tiran tiran requested a review from encukou March 21, 2019 11:32
@codecov
Copy link

codecov bot commented Mar 21, 2019

Codecov Report

Merging #271 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #271   +/-   ##
======================================
  Coverage    71.1%   71.1%           
======================================
  Files          49      49           
  Lines        4818    4818           
  Branches      812     812           
======================================
  Hits         3426    3426           
- Misses       1056    1057    +1     
+ Partials      336     335    -1
Impacted Files Coverage Δ
Lib/ldap/ldapobject.py 76.38% <ø> (ø) ⬆️
Lib/ldap/controls/deref.py 57.14% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update adf4761...a9bb1dd. Read the comment docs.

@encukou encukou merged commit 1d373da into python-ldap:master May 24, 2019
@tiran tiran added this to the 3.3 milestone May 27, 2020
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

Successfully merging this pull request may close these issues.

Invalid string formatting in compare_ext_s
2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy