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

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

Issue 719313003: Revert "pylint: upgrade to 1.3.1" (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
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
« no previous file with comments | « third_party/logilab/common/deprecation.py ('k') | third_party/logilab/common/graph.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/logilab/common/fileutils.py
diff --git a/third_party/logilab/common/fileutils.py b/third_party/logilab/common/fileutils.py
index b30cf5f87fd3dbedea02fe2579007e73aa7c0d7e..4ac927023d2a6ed06e0afab3a376b5e7fbf576fa 100644
--- a/third_party/logilab/common/fileutils.py
+++ b/third_party/logilab/common/fileutils.py
@@ -23,9 +23,6 @@ get_by_ext, remove_dead_links
write_open_mode, ensure_fs_mode, export
:sort: path manipulation, file manipulation
"""
-
-from __future__ import print_function
-
__docformat__ = "restructuredtext en"
import sys
@@ -35,11 +32,12 @@ from os.path import isabs, isdir, islink, split, exists, normpath, join
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
+from logilab.common.compat import FileIO, any
def first_level_directory(path):
"""Return the first level directory of a path.
@@ -377,7 +375,7 @@ def export(from_dir, to_dir,
src = join(directory, filename)
dest = to_dir + src[len(from_dir):]
if verbose:
- print(src, '->', dest, file=sys.stderr)
+ print >> sys.stderr, src, '->', dest
if exists(dest):
remove(dest)
shutil.copy2(src, dest)
@@ -399,6 +397,6 @@ def remove_dead_links(directory, verbose=0):
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)
« no previous file with comments | « third_party/logilab/common/deprecation.py ('k') | third_party/logilab/common/graph.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698