2192 userland-fetch can't handle FTP link.
authorAndrew Stormont <andrew.stormont@nexenta.com>
Sun, 11 Mar 2012 22:49:55 +0000
changeset 492 feb4ae69ab0d
parent 491 57540878a121
child 493 66a35caef41c
2192 userland-fetch can't handle FTP link. Reviewed by: Jon Tibble <[email protected]> Reviewed by: Adam Števko <[email protected]> Reviewed by: Igor Kozhukhov <[email protected]> Approved by: Andrew Stormont <[email protected]>
tools/userland-fetch
--- a/tools/userland-fetch	Wed Mar 07 12:52:51 2012 +0000
+++ b/tools/userland-fetch	Sun Mar 11 22:49:55 2012 +0000
@@ -103,7 +103,7 @@
 		return None
 
 	# 3xx, 4xx and 5xx (f|ht)tp codes designate unsuccessfull action
-	if 3 <= int(src.getcode()/100) <= 5:
+	if src.getcode() and (3 <= int(src.getcode()/100) <= 5):
 		print "Error code: " + str(src.getcode())
 		return None