class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option('-t', '--tags', dest='tags', metavar='SLUG,...',
- help='Use only books tagged with this tags'),
+ help='Use only books tagged with this tags'),
make_option('-i', '--include', dest='include', metavar='SLUG,...',
- help='Include specific books by slug'),
+ help='Include specific books by slug'),
make_option('-e', '--exclude', dest='exclude', metavar='SLUG,...',
- help='Exclude specific books by slug')
+ help='Exclude specific books by slug')
)
help = 'Prepare data for Lesmianator.'
try:
path = settings.LESMIANATOR_PICKLE
- except:
+ except AttributeError:
print self.style.ERROR('LESMIANATOR_PICKLE not set in the settings.')
return
try:
dump(lesmianator, open(path, 'w'))
- except:
+ except IOError:
print self.style.ERROR("Couldn't write to $s" % path)
return