From 9f4ab37f5f7736c112fbbb1c157321cdc3c0570f Mon Sep 17 00:00:00 2001 From: Sebastian Heinlein Date: Wed, 27 Aug 2008 14:48:14 +0200 Subject: For empt --- apt/package.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'apt') diff --git a/apt/package.py b/apt/package.py index 3b26fb2b..3eb692d8 100644 --- a/apt/package.py +++ b/apt/package.py @@ -376,16 +376,19 @@ class Package(object): installedSize = property(installedSize) def installedFiles(self): - """ Return the list of files installed on the system by the package """ + """ + Return the list of unicode names of the files which have + been installed by this package + """ if not self.isInstalled: - return None + return [] path = "/var/lib/dpkg/info/%s.list" % self.name try: list = open(path) - files = list.read().split("\n") + files = list.read().decode().split("\n") list.close() except: - return None + return [] return files installedFiles = property(installedFiles) -- cgit v1.2.3