Merge lp:~stefanor/pylibravatar/no-server into lp:pylibravatar

Proposed by Stefano Rivera
Status: Merged
Merged at revision: 42
Proposed branch: lp:~stefanor/pylibravatar/no-server
Merge into: lp:pylibravatar
Diff against target: 14 lines (+4/-0)
1 file modified
libravatar.py (+4/-0)
To merge this branch: bzr merge lp:~stefanor/pylibravatar/no-server
Reviewer Review Type Date Requested Status
François Marier Approve
Review via email: mp+285291@code.launchpad.net

Description of the change

Ran into this while hacking on a project using libravatar, on a plane.

Sometimes you don't have DNS servers available :)

To post a comment you must log in.
Revision history for this message
François Marier (fmarier) wrote :

Good idea, thanks for submitting a patch!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libravatar.py'
--- libravatar.py 2015-08-02 18:20:02 +0000
+++ libravatar.py 2016-02-07 10:01:46 +0000
@@ -160,6 +160,10 @@
160 print("DNS Error: %s" % message)160 print("DNS Error: %s" % message)
161 return None161 return None
162162
163 if dns_request is None:
164 # No servers discovered?
165 return None
166
163 if 'NXDOMAIN' == dns_request.header['status']:167 if 'NXDOMAIN' == dns_request.header['status']:
164 # Not an error, but no point in going any further168 # Not an error, but no point in going any further
165 return None169 return None

Subscribers

People subscribed via source and target branches