summaryrefslogtreecommitdiff
path: root/paste/util/finddata.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2014-03-19 12:51:48 +0100
committerVictor Stinner <victor.stinner@gmail.com>2014-03-19 12:51:48 +0100
commit4c177fce89fee925f0f4fbfde00ce2e1252562c0 (patch)
tree3e7a8a8f9771aeb649449b390d1ba5038cc32059 /paste/util/finddata.py
parent4450e264ae1d68e0150e0ab9f611118d9797d694 (diff)
downloadpaste-4c177fce89fee925f0f4fbfde00ce2e1252562c0.tar.gz
Python 3: fix more submodules
* print syntax * replace "except Exception, exc:" with "except Exception as exc:"
Diffstat (limited to 'paste/util/finddata.py')
-rw-r--r--paste/util/finddata.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/paste/util/finddata.py b/paste/util/finddata.py
index af29c04..05c8546 100644
--- a/paste/util/finddata.py
+++ b/paste/util/finddata.py
@@ -4,6 +4,7 @@
# you can't import this from another package, when you don't know if
# that package is installed yet.
+from __future__ import print_function
import os
import sys
from fnmatch import fnmatchcase
@@ -61,9 +62,8 @@ def find_package_data(
or fn.lower() == pattern.lower()):
bad_name = True
if show_ignored:
- print >> sys.stderr, (
- "Directory %s ignored by pattern %s"
- % (fn, pattern))
+ print("Directory %s ignored by pattern %s"
+ % (fn, pattern), file=sys.stderr)
break
if bad_name:
continue
@@ -84,9 +84,8 @@ def find_package_data(
or fn.lower() == pattern.lower()):
bad_name = True
if show_ignored:
- print >> sys.stderr, (
- "File %s ignored by pattern %s"
- % (fn, pattern))
+ print("File %s ignored by pattern %s"
+ % (fn, pattern), file=sys.stderr)
break
if bad_name:
continue