>From publish.py:
94 status, id = t.open(config, pargs[0])
95
96 if status / 100 == 4 or status / 100 == 5:
97 print >> sys.stderr, \
98 _("pkgsend: server failed (status %s)") % status
99 sys.exit(1)
If I'm reading this right, this is "clever code" that says that if the
response code returned is anything in the 400 or 500 range, it should
be considered an error.
Since I'm working on bug 255 (Symbolic HTTP response codes should be
used), I think this code may be too clever for its own good :)
I was thinking of using a lambda to do a quasi-switch-case on the
response codes that are valid.
Thoughts?
--
Shawn Walker, Software and Systems Analyst
http://binarycrusader.blogspot.com/
"To err is human -- and to blame it on a computer is even more so." -
Robert Orben
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss