Mercurial > hg
diff hgext/phabricator.py @ 40378:b015f30a91fb
phabricator: do more of the VCR work in demandimport.deactivated()
If I don't do this, VCR gets confused looking for pycurl and other
libraries. I have no idea how this ever worked.
Differential Revision: https://phab.mercurial-scm.org/D5159
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 19 Oct 2018 11:45:25 -0400 |
parents | 38ac525b44c9 |
children | 7e2c58b08e74 |
line wrap: on
line diff
--- a/hgext/phabricator.py Fri Oct 19 11:28:29 2018 -0400 +++ b/hgext/phabricator.py Fri Oct 19 11:45:25 2018 -0400 @@ -131,14 +131,15 @@ with hgdemandimport.deactivated(): import vcr as vcrmod import vcr.stubs as stubs - vcr = vcrmod.VCR( - serializer=r'json', - custom_patches=[ - (urlmod, 'httpconnection', stubs.VCRHTTPConnection), - (urlmod, 'httpsconnection', stubs.VCRHTTPSConnection), - ]) - with vcr.use_cassette(cassette): - return fn(*args, **kwargs) + vcr = vcrmod.VCR( + serializer=r'json', + custom_patches=[ + (urlmod, 'httpconnection', stubs.VCRHTTPConnection), + (urlmod, 'httpsconnection', + stubs.VCRHTTPSConnection), + ]) + with vcr.use_cassette(cassette): + return fn(*args, **kwargs) return fn(*args, **kwargs) inner.__name__ = fn.__name__ return command(name, fullflags, spec)(inner)