Submitter | Augie Fackler |
---|---|
Date | March 11, 2017, 7:39 p.m. |
Message ID | <eb7a5670afe8cbf8865b.1489261156@augie-macbookair2.roam.corp.google.com> |
Download | mbox | patch |
Permalink | /patch/19105/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/config.py b/mercurial/config.py --- a/mercurial/config.py +++ b/mercurial/config.py @@ -13,6 +13,7 @@ import os from .i18n import _ from . import ( error, + pycompat, util, ) @@ -69,6 +70,9 @@ class config(object): def items(self, section): return self._data.get(section, {}).items() def set(self, section, item, value, source=""): + if pycompat.ispy3: + assert not isinstance(value, str), ( + 'config values may not be unicode strings on Python 3') if section not in self: self._data[section] = util.sortdict() self._data[section][item] = value