Fix scrapy.cfg validation

Signed-off-by: Felipe Ruhland <felipe.ruhland@gmail.com>
This commit is contained in:
Felipe Ruhland 2016-07-19 00:04:45 -03:00
parent 9ad54b3815
commit de64a1f68a
1 changed files with 5 additions and 4 deletions

View File

@ -79,10 +79,11 @@ class Command(ScrapyCommand):
if len(args) == 2:
project_dir = args[1]
if exists(join(project_dir, 'scrapy.cfg')):
self.exitcode = 1
print('Error: scrapy.cfg already exists in %s' % abspath(project_dir))
return
if exists(join(project_dir, 'scrapy.cfg')):
self.exitcode = 1
print('Error: scrapy.cfg already exists in %s' % abspath(project_dir))
return
if not self._is_valid_name(project_name):
self.exitcode = 1