projects
/
mdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
103ba2e
)
Moodle remove displays a nice error when missing permissions
author
Frederic Massart
<fred@moodle.com>
Fri, 10 Aug 2012 06:42:26 +0000
(14:42 +0800)
committer
Frederic Massart
<fred@moodle.com>
Fri, 10 Aug 2012 06:42:26 +0000
(14:42 +0800)
moodle-remove.py
patch
|
blob
|
history
diff --git
a/moodle-remove.py
b/moodle-remove.py
index
ba77579
..
95ad246
100755
(executable)
--- a/
moodle-remove.py
+++ b/
moodle-remove.py
@@
-30,5
+30,12
@@
if not args.do:
sys.exit(0)
debug('Removing %s...' % args.name)
-Wp.delete(args.name)
+try:
+ Wp.delete(args.name)
+except OSError:
+ debug('Error while deleting the instance.')
+ debug('This is probably a permission issue.')
+ debug('Run: sudo chmod -R 0777 %s' % Wp.getPath(args.name))
+ sys.exit(1)
+
debug('Instance removed')