projects
/
mdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe0d07a
)
Accept -f argument to remove
author
Andrew Nicols
<andrew@nicols.co.uk>
Tue, 29 Oct 2013 05:36:56 +0000
(13:36 +0800)
committer
Andrew Nicols
<andrew@nicols.co.uk>
Tue, 29 Oct 2013 05:36:56 +0000
(13:36 +0800)
lib/commands/remove.py
patch
|
blob
|
history
diff --git
a/lib/commands/remove.py
b/lib/commands/remove.py
index
e288713
..
4b5687f
100644
(file)
--- a/
lib/commands/remove.py
+++ b/
lib/commands/remove.py
@@
-42,6
+42,14
@@
class RemoveCommand(Command):
'dest': 'do',
'help': 'do not ask for confirmation'
}
+ ),
+ (
+ ['-f'],
+ {
+ 'action': 'store_true',
+ 'dest': 'force',
+ 'help': 'force and do not ask for confirmation'
+ }
)
]
_description = 'Completely remove an instance'
@@
-53,7
+61,7
@@
class RemoveCommand(Command):
except:
raise Exception('This is not a Moodle instance')
- if not args.do:
+ if not args.do
and not args.force
:
confirm = raw_input('Are you sure? (Y/n) ')
if confirm != 'Y':
logging.info('Aborting...')