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

Unified Diff: lib/naclports/package.py

Issue 1285953002: Switch devenv to use pkg packages (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@toolchain_install
Patch Set: 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 | « lib/naclports/bsd_pkg.py ('k') | lib/naclports/source_package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/naclports/package.py
diff --git a/lib/naclports/package.py b/lib/naclports/package.py
index d42e6a461877dee4cd1079c7b14082adf7bbfbca..322f888b410df33b3a46ff0fb25acc0380fa7b84 100644
--- a/lib/naclports/package.py
+++ b/lib/naclports/package.py
@@ -151,6 +151,9 @@ class InstalledPackage(Package):
def Files(self):
"""Yields the list of files currently installed by this package."""
+ file_list = self.GetListFile()
+ if not os.path.exists(file_list):
+ return
with open(self.GetListFile()) as f:
for line in f:
yield line.strip()
@@ -168,7 +171,8 @@ class InstalledPackage(Package):
LogVerbose('uninstall: %s' % filename)
RemoveFile(fullname)
- RemoveFile(self.GetListFile())
+ if os.path.exists(self.GetListFile()):
+ RemoveFile(self.GetListFile())
def InstalledPackageIterator(config):
« no previous file with comments | « lib/naclports/bsd_pkg.py ('k') | lib/naclports/source_package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698