self.dataset = {}
self.filename = ('%s.csv' % (self.determine_filename()))
self.directory = self.determine_directory()
- self.create_path()
+ self.full_path = os.path.join(self.directory, self.filename)
self.filemode = self.determine_filemode()
+ self.create_path()
self.today = datetime.today()
self.email = {}
return os.path.basename(self.name)
def determine_filemode(self):
- if os.path.isfile('%s/%s' % (self.gerrit.data_location, self.filename)) == False:
+ if os.path.isfile(self.full_path) == False:
return 'w'
else:
return 'a'
def create_dataset(repos, gerrit):
for key, repo in repos.iteritems():
- fh = open('%s%s' % (repo.directory, repo.filename), repo.filemode)
+ fh = open(repo.full_path, repo.filemode)
if repo.filemode == 'w':
write_heading(fh, repo)
output_results(fh, repo.today.month,'-',repo.today.day,'-',repo.today.year,',',repo.name,',')