[Request] [+ ] D8525: phabricator: avoid passing None to pycompat.fsdecode

sfink (Steve Fink) phabricator at mercurial-scm.org
Fri May 15 00:20:07 UTC 2020


sfink created this revision.
sfink added a comment.
Herald added subscribers: mercurial-patches, Kwan.
Herald added a reviewer: hg-reviewers.


  I got crashes without vcr enabled

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8525

AFFECTED FILES
  hgext/phabricator.py

CHANGE DETAILS

diff --git a/hgext/phabricator.py b/hgext/phabricator.py
--- a/hgext/phabricator.py
+++ b/hgext/phabricator.py
@@ -237,8 +237,8 @@
 
     def decorate(fn):
         def inner(*args, **kwargs):
-            cassette = pycompat.fsdecode(kwargs.pop('test_vcr', None))
-            if cassette:
+            if kwargs.get('test_vcr'):
+                cassette = pycompat.fsdecode(kwargs.pop('test_vcr'))
                 import hgdemandimport
 
                 with hgdemandimport.deactivated():



To: sfink, #hg-reviewers
Cc: Kwan, mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200515/45ac7c22/attachment.html>


More information about the Mercurial-patches mailing list