Mercurial > evolve
changeset 2455:d93a50a9abf5
effectflag: handle invalid data
If we get a marker with an invalid input we should not crash the whole process.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 19 May 2017 20:50:00 +0200 |
parents | 400dbec0849c |
children | 63be7982d593 |
files | hgext3rd/evolve/obshistory.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/obshistory.py Fri May 19 20:49:20 2017 +0200 +++ b/hgext3rd/evolve/obshistory.py Fri May 19 20:50:00 2017 +0200 @@ -340,9 +340,13 @@ label="evolve.verb") effectflag = metadata.get('ef1') + if effectflag is not None: + try: + effectflag = int(effectflag) + except ValueError: + effectflag = None if effectflag: effect = [] - effectflag = int(effectflag) if effectflag & DESCCHANGED: effect.append('description')