Patchwork D8525: phabricator: avoid passing None to pycompat.fsdecode

login
register
mail settings
Submitter phabricator
Date May 15, 2020, 12:20 a.m.
Message ID <differential-rev-PHID-DREV-fhkneufidi7z5xse364c-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46313/
State Superseded
Headers show

Comments

phabricator - May 15, 2020, 12:20 a.m.
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




To: sfink, #hg-reviewers
Cc: Kwan, mercurial-patches, mercurial-devel

Patch

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():