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

Unified Diff: build/android/pylib/utils/zip_utils.py

Issue 1314913009: [Android] Move some pylib modules into devil/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 4 months 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 | « build/android/pylib/utils/watchdog_timer.py ('k') | content/telemetry.isolate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/zip_utils.py
diff --git a/build/android/pylib/utils/zip_utils.py b/build/android/pylib/utils/zip_utils.py
index d799463f9042b8a99ae0da2dc88d5183164be2c4..007b34b34a0884fdb7aa581dfb36b7d04d3c65e6 100644
--- a/build/android/pylib/utils/zip_utils.py
+++ b/build/android/pylib/utils/zip_utils.py
@@ -2,30 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging
-import os
-import zipfile
-
-
-def WriteToZipFile(zip_file, path, arc_path):
- """Recursively write |path| to |zip_file| as |arc_path|.
-
- zip_file: An open instance of zipfile.ZipFile.
- path: An absolute path to the file or directory to be zipped.
- arc_path: A relative path within the zip file to which the file or directory
- located at |path| should be written.
- """
- if os.path.isdir(path):
- for dir_path, _, file_names in os.walk(path):
- dir_arc_path = os.path.join(arc_path, os.path.relpath(dir_path, path))
- logging.debug('dir: %s -> %s', dir_path, dir_arc_path)
- zip_file.write(dir_path, dir_arc_path, zipfile.ZIP_STORED)
- for f in file_names:
- file_path = os.path.join(dir_path, f)
- file_arc_path = os.path.join(dir_arc_path, f)
- logging.debug('file: %s -> %s', file_path, file_arc_path)
- zip_file.write(file_path, file_arc_path, zipfile.ZIP_DEFLATED)
- else:
- logging.debug('file: %s -> %s', path, arc_path)
- zip_file.write(path, arc_path, zipfile.ZIP_DEFLATED)
+# pylint: disable=unused-wildcard-import
+# pylint: disable=wildcard-import
+from devil.utils.zip_utils import *
« no previous file with comments | « build/android/pylib/utils/watchdog_timer.py ('k') | content/telemetry.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698