From 15ed0a10e2ff211aaa4e8a3f953b2b1ab0505ce8 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 28 Apr 2016 01:54:17 -0400 Subject: [PATCH] User self.stderr instead of print. Colorize the error message. --- mayan/apps/mirroring/management/commands/mountindex.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mayan/apps/mirroring/management/commands/mountindex.py b/mayan/apps/mirroring/management/commands/mountindex.py index 831e1a4718..b416a11154 100644 --- a/mayan/apps/mirroring/management/commands/mountindex.py +++ b/mayan/apps/mirroring/management/commands/mountindex.py @@ -211,8 +211,6 @@ class IndexFS(Operations): class Command(management.BaseCommand): help = 'Mount an index as a FUSE filesystem.' - usage_str = 'Usage: ./manage.py mountindex [index slug] [mount point]' - #args = '[index slug] [mount point]' def add_arguments(self, parser): parser.add_argument('slug', nargs='?', @@ -225,7 +223,7 @@ class Command(management.BaseCommand): def handle(self, *args, **options): if not options.get('slug') or not options.get('mount_point'): - print('Incorrect number of arguments') + self.stderr.write(self.style.ERROR('Incorrect number of arguments')) exit(1) FUSE(