Use the correct filename when calling idnits. Fixes #611

- Legacy-Id: 2879
This commit is contained in:
Emilio A. Sánchez López 2011-03-12 12:44:08 +00:00
parent cf455f5be2
commit d95d089bc4

View file

@ -221,7 +221,7 @@ class UploadForm(forms.Form):
return self.save_draft_info(self.draft)
def check_idnits(self):
filepath = os.path.join(self.staging_path, self.cleaned_data['txt'].name)
filepath = os.path.join(self.staging_path, '%s-%s.txt' % (self.draft.filename, self.draft.revision))
p = subprocess.Popen([self.idnits, '--submitcheck', '--nitcount', filepath], stdout=subprocess.PIPE)
self.idnits_message = p.stdout.read()