Patchwork D7078: automation: capture additional exception when formatting

login
register
mail settings
Submitter phabricator
Date Oct. 12, 2019, 8:56 p.m.
Message ID <differential-rev-PHID-DREV-w5cs5hi5l7pn76yhyfjo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42278/
State Superseded
Headers show

Comments

phabricator - Oct. 12, 2019, 8:56 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I started encountering this for some reason.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  contrib/automation/hgautomation/winrm.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/automation/hgautomation/winrm.py b/contrib/automation/hgautomation/winrm.py
--- a/contrib/automation/hgautomation/winrm.py
+++ b/contrib/automation/hgautomation/winrm.py
@@ -55,7 +55,7 @@ 
 
     try:
         o = str(o)
-    except TypeError:
+    except (AttributeError, TypeError):
         o = pprint.pformat(o.extended_properties)
 
     return o