From b26b22c026e450cdef10f4d21ef46bf212c3baf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Cholewi=C5=84ski?= Date: Fri, 10 Apr 2015 10:35:06 +0200 Subject: [PATCH] Python 3 support: exception handling syntax --- boltons/fileutils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boltons/fileutils.py b/boltons/fileutils.py index a5157a6..66d338f 100644 --- a/boltons/fileutils.py +++ b/boltons/fileutils.py @@ -381,11 +381,11 @@ def copy_tree(src, dst, symlinks=False, ignore=None): # continue with other files except Error as e: errors.extend(e.args[0]) - except EnvironmentError, why: + except EnvironmentError as why: errors.append((srcname, dstname, str(why))) try: copystat(src, dst) - except OSError, why: + except OSError as why: if WindowsError is not None and isinstance(why, WindowsError): # Copying file access times may fail on Windows pass