Fixed a bug in exact search pattern matching.

This commit is contained in:
Griatch 2012-09-27 21:29:01 +02:00
parent 60e3f5f172
commit 59ccd3eb38
3 changed files with 115 additions and 116 deletions

View file

@ -1232,7 +1232,7 @@ class CmdSetAttribute(ObjManipCommand):
# Use literal_eval to parse python structure exactly.
try:
return _LITERAL_EVAL(strobj)
except SyntaxError:
except (SyntaxError, ValueError):
# treat as string
string = "{RNote: Value was converted to string. If you don't want this, "
string += "use proper Python syntax, like enclosing strings in quotes.{n"