Skip to content
Browse files

CBD-514: Use a more meaningful function name

Change-Id: Ib2056cc0aa8febce1099f432deec2f2c88aa461f
Reviewed-on: http://review.couchbase.org/19819
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Bin Cui <bin.cui@gmail.com>
  • Loading branch information...
1 parent 8465c80 commit e26a61d7ea678dfe9fd863692c9859052103e581 @bcui6611 bcui6611 committed Aug 17, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 cbdocloader
View
10 cbdocloader
@@ -91,7 +91,7 @@ class DocLoader:
def gen_dockey(self, filename):
return os.path.basename(filename).split('.')[0]
- def list_files(self, subdir=None):
+ def enumerate_and_save(self, subdir=None):
if not subdir:
subdir = self.args[0]
subdirlist = list()
@@ -112,15 +112,15 @@ class DocLoader:
else:
subdirlist.append(os.path.join(subdir, item))
for dir in subdirlist:
- self.list_files(dir)
+ self.enumerate_and_save(dir)
for dir in viewdirs:
- self.list_files(dir)
+ self.enumerate_and_save(dir)
def unzip_file_and_upload(self):
zfobj = zipfile.ZipFile(self.args[0])
working_dir = os.path.join(os.path.dirname(sys.argv[0]), '_working')
zfobj.extractall(working_dir)
- self.list_files(working_dir)
+ self.enumerate_and_save(working_dir)
shutil.rmtree(working_dir)
def populate_docs(self):
@@ -134,7 +134,7 @@ class DocLoader:
if self.args[0].endswith('.zip'):
self.unzip_file_and_upload()
else:
- self.list_files()
+ self.enumerate_and_save()
def verify_queries(self):
for view in self.views:

0 comments on commit e26a61d

Please sign in to comment.
Something went wrong with that request. Please try again.