missing "self"s and imports...

This commit is contained in:
Barış Metin
2005-10-10 11:09:23 +00:00
parent eacd937592
commit 9cf1b567d8
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -819,6 +819,7 @@ Finds the installed package which contains the specified file.
search_exact = staticmethod(search_exact) search_exact = staticmethod(search_exact)
def run(self): def run(self):
import os.path
self.init(True) self.init(True)
@@ -830,7 +831,7 @@ Finds the installed package which contains the specified file.
for path in self.args: for path in self.args:
ctx.ui.info(_('Searching for %s') % path) ctx.ui.info(_('Searching for %s') % path)
if os.path.exists(path): if os.path.exists(path):
search_exact(os.path.realpath(path)) self.search_exact(os.path.realpath(path))
else: else:
pisi.api.error(_('%s cannot be found')) pisi.api.error(_('%s cannot be found'))
+3 -3
View File
@@ -103,14 +103,14 @@ class FilesDB(shelve.LockedDBShelf):
shelve.LockedDBShelf.__init__(self, 'files') shelve.LockedDBShelf.__init__(self, 'files')
#self.files_dir = pisi.util.join_path(ctx.config.db_dir(), 'files') #self.files_dir = pisi.util.join_path(ctx.config.db_dir(), 'files')
def add_files(pkg_name, files): def add_files(self, pkg_name, files):
for x in files.list: for x in files.list:
self[x.path] = (pkg_name, x) self[x.path] = (pkg_name, x)
def has_file(path): def has_file(self, path):
return self.has_key(path) return self.has_key(path)
def get_file_info(path): def get_file_info(self, path):
if not self.has_key(path): if not self.has_key(path):
return None return None
else: else: