Commit d535b352 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI

Merge branch 'basestr' into 'master'

Handle unicode strings in Python 2 properly See merge request !70
parents 8655cd8b 3b1d72c9
Pipeline #16945 passed with stages
in 13 minutes 37 seconds
......@@ -4,6 +4,10 @@ import click
import logging
# This needs to bob so that logger is configured for all bob packages.
logger = logging.getLogger('bob')
except NameError:
basestring = str
def verbosity_option(**kwargs):
......@@ -130,7 +134,7 @@ class ResourceOption(click.Option):
if self.entry_point_group is not None:
keyword = self.entry_point_group.split('.')[-1]
while isinstance(value, str):
while isinstance(value, basestring):
value = load([value], entry_point_group=self.entry_point_group)
value = getattr(value, keyword)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment