local: Make clear command mesages more clear
(cherry picked from commit 812f018d59)
This commit is contained in:
parent
f96eb1d4f7
commit
99cc11bcae
@ -37,17 +37,17 @@ class ClearCommand(commands.Command):
|
|||||||
|
|
||||||
def run(self, args, config):
|
def run(self, args, config):
|
||||||
library = _get_library(args, config)
|
library = _get_library(args, config)
|
||||||
prompt = 'Are you sure you want to clear the library? [y/N] '
|
prompt = '\nAre you sure you want to clear the library? [y/N] '
|
||||||
|
|
||||||
if raw_input(prompt).lower() != 'y':
|
if raw_input(prompt).lower() != 'y':
|
||||||
logging.info('Clearing library aborted.')
|
print 'Clearing library aborted.'
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
if library.clear():
|
if library.clear():
|
||||||
logging.info('Library succesfully cleared.')
|
print 'Library succesfully cleared.'
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
logging.warning('Unable to clear library.')
|
print 'Unable to clear library.'
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user