Skip to content

Commit

Permalink
Different check for iterability. h/t @Kwpolska
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed May 9, 2018
1 parent 04b9bde commit 0629a43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/utils.py
Expand Up @@ -69,7 +69,7 @@
husl = None

from blinker import signal
from collections import defaultdict, Callable, OrderedDict
from collections import defaultdict, Callable, OrderedDict, Iterable
from importlib import reload as _reload
from logbook.compat import redirect_logging
from logbook.more import ExceptionHandler, ColorizedStderrHandler
Expand Down Expand Up @@ -1881,7 +1881,7 @@ def smartjoin(join_char: str, string_or_iterable) -> str:
"""
if isinstance(string_or_iterable, (unicode_str, bytes_str)):
return string_or_iterable
elif hasattr(string_or_iterable, '__iter__'):
elif isinstance(string_or_iterable, Iterable):
return join_char.join([str(e) for e in string_or_iterable])
else:
return str(string_or_iterable)
Expand Down

0 comments on commit 0629a43

Please sign in to comment.