Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Unified Diff: third_party/logilab/common/fileutils.py

Issue 707353002: pylint: upgrade to 1.3.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/logilab/common/fileutils.py
===================================================================
--- third_party/logilab/common/fileutils.py (revision 292986)
+++ third_party/logilab/common/fileutils.py (working copy)
@@ -23,6 +23,9 @@
write_open_mode, ensure_fs_mode, export
:sort: path manipulation, file manipulation
"""
+
+from __future__ import print_function
+
__docformat__ = "restructuredtext en"
import sys
@@ -32,12 +35,11 @@
from os.path import abspath
from os import sep, mkdir, remove, listdir, stat, chmod, walk
from stat import ST_MODE, S_IWRITE
-from cStringIO import StringIO
from logilab.common import STD_BLACKLIST as BASE_BLACKLIST, IGNORED_EXTENSIONS
from logilab.common.shellutils import find
from logilab.common.deprecation import deprecated
-from logilab.common.compat import FileIO, any
+from logilab.common.compat import FileIO
def first_level_directory(path):
"""Return the first level directory of a path.
@@ -375,7 +377,7 @@
src = join(directory, filename)
dest = to_dir + src[len(from_dir):]
if verbose:
- print >> sys.stderr, src, '->', dest
+ print(src, '->', dest, file=sys.stderr)
if exists(dest):
remove(dest)
shutil.copy2(src, dest)
@@ -397,6 +399,6 @@
src = join(dirpath, filename)
if islink(src) and not exists(src):
if verbose:
- print 'remove dead link', src
+ print('remove dead link', src)
remove(src)

Powered by Google App Engine
This is Rietveld 408576698