phabricator: avoid passing None to pycompat.fsdecode
authorSteve Fink <sfink@mozilla.com>
Thu, 27 Feb 2020 09:54:34 -0800
changeset 44847 11592ce6a711
parent 44846 47787a48f469
child 44848 7e7080ab8ba8
phabricator: avoid passing None to pycompat.fsdecode Differential Revision: https://phab.mercurial-scm.org/D8525
hgext/phabricator.py
--- a/hgext/phabricator.py	Sun May 17 12:23:03 2020 -0400
+++ b/hgext/phabricator.py	Thu Feb 27 09:54:34 2020 -0800
@@ -238,8 +238,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():