From 2e9397f5b4fb07dcbaceedb3286471ee7fa107a2 Mon Sep 17 00:00:00 2001 From: Konsta Vesterinen Date: Thu, 6 Feb 2014 11:08:39 +0200 Subject: [PATCH] Fix py3 compat --- sqlalchemy_utils/decorators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sqlalchemy_utils/decorators.py b/sqlalchemy_utils/decorators.py index 9c44a03..4ffc958 100644 --- a/sqlalchemy_utils/decorators.py +++ b/sqlalchemy_utils/decorators.py @@ -8,7 +8,7 @@ def getdotattr(obj, dot_path): """ Allows dot-notated strings to be passed to `getattr` """ - return reduce(getattr, dot_path.split('.'), obj) + return six.moves.reduce(getattr, dot_path.split('.'), obj) class AttributeValueGenerator(object):