-
-
Save bcsaller/f1bb5f44520b5a35182c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=== modified file 'cloudfoundry/utils.py' | |
--- cloudfoundry/utils.py 2014-10-27 19:30:20 +0000 | |
+++ cloudfoundry/utils.py 2014-10-27 19:41:54 +0000 | |
@@ -438,9 +438,13 @@ | |
return None | |
for server in ['@8.8.8.8', '']: | |
- output = subprocess.check_output( | |
- filter(None, ['dig', '+short', server, address])) | |
- result = filter_ip(output) | |
- if result: | |
- return result | |
+ try: | |
+ output = subprocess.check_output( | |
+ filter(None, ['dig', '+short', server, address])) | |
+ result = filter_ip(output) | |
+ if result: | |
+ return result | |
+ except subprocess.CalledProcessError: | |
+ pass | |
+ | |
return None | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment