projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Error if set command is used on read-only element
[mudpy.git]
/
mudpy
/
misc.py
diff --git
a/mudpy/misc.py
b/mudpy/misc.py
index
157096c
..
b0b7290
100644
(file)
--- a/
mudpy/misc.py
+++ b/
mudpy/misc.py
@@
-2294,6
+2294,11
@@
def command_set(actor, parameters):
else:
try:
universe.contents[element].set(facet, value)
else:
try:
universe.contents[element].set(facet, value)
+ except PermissionError:
+ message = ('The "%s" element is kept in read-only file '
+ '"%s" and cannot be altered.' %
+ (element, universe.contents[
+ element].origin.filename))
except ValueError:
message = ('Value "%s" of type "%s" cannot be coerced '
'to the correct datatype for facet "%s".' %
except ValueError:
message = ('Value "%s" of type "%s" cannot be coerced '
'to the correct datatype for facet "%s".' %