Comment 7 for bug 477902

Revision history for this message
Duncan McGreggor (oubiwann) wrote : Re: [Bug 477902] Re: txjsonrpc.auth has reference to twisted.web and twisted.web2

Sergey Kotov wrote:
> I change auth.py on lp:~sergey-kotov/txjsonrpc/auth
> to raise ImportError if web and web2 are None

Hey Sergey,

The raise you added to wrapResource isn't needed -- the private
functions that are called in wrapResource already do that.

Likewise, the only places that instantiates the HTTPAuthRealm are the
private functions, which are already "protected".

Trunk should work for anyone that doesn't have either web or web2
installed. The appropriate error should be raised when one tries to wrap
a resource. However, the wrapping that takes place depends upon the type
of resource implemented... so if you don't have web2 installed, it's
going to be very difficult to call _wrapTwistedWeb2Resource!

That being said, are you still seeing an error? If you are seeing an
error, can you paste your code and the error that you see?

Thanks!

d