Revision: 2998
Author: jprantan
Date: Thu Apr 15 05:30:46 2010
Log: Removed safe_repr
http://code.google.com/p/robotframework/source/detail?r=2998

Modified:
 /trunk/src/robot/running/arguments.py
 /trunk/src/robot/running/keywords.py
 /trunk/src/robot/utils/__init__.py
 /trunk/src/robot/utils/robottypes.py

=======================================
--- /trunk/src/robot/running/arguments.py       Thu Apr 15 04:38:34 2010
+++ /trunk/src/robot/running/arguments.py       Thu Apr 15 05:30:46 2010
@@ -43,8 +43,8 @@
     def _tracelog_args(self, logger, posargs, namedargs={}):
         if not logger:
             return
-        args = [ utils.safe_repr(a) for a in posargs ] \
- + [ '%s=%s' % (utils.unic(a), utils.safe_repr(namedargs[a])) for a in namedargs ]
+        args = [ repr(a) for a in posargs ] \
+ + [ '%s=%r' % (utils.unic(a), namedargs[a]) for a in namedargs ]
         logger.trace('Arguments: [ %s ]' % ' | '.join(args))


@@ -270,11 +270,10 @@
     def _get_arguments_as_string(self, variables):
         args = []
         for name in self.names + (self._vararg and [self._vararg] or []):
-            args.append('%s=%s' % (name, utils.safe_repr(variables[name])))
+            args.append('%s=%r' % (name, variables[name]))
         return ' | '.join(args)


-
 class _MissingArg(object):
     def __getattr__(self, name):
         raise RuntimeError()
=======================================
--- /trunk/src/robot/running/keywords.py        Thu Apr 15 00:44:49 2010
+++ /trunk/src/robot/running/keywords.py        Thu Apr 15 05:30:46 2010
@@ -50,7 +50,7 @@
             output.warn("Keyword '%s' is deprecated. %s" % (name, msg))
         try:
             ret = self._run(handler, output, namespace)
-            output.trace('Return: %s' % utils.safe_repr(ret))
+            output.trace('Return: %r' % ret)
         except ExecutionFailed, err:
             self.status = 'FAIL'
         else:
=======================================
--- /trunk/src/robot/utils/__init__.py  Wed Apr 14 02:43:31 2010
+++ /trunk/src/robot/utils/__init__.py  Thu Apr 15 05:30:46 2010
@@ -36,7 +36,7 @@
         timestamp_to_secs, parse_time
 from robottypes import is_list, is_tuple, is_scalar, is_str, is_integer, \
         is_boolean, is_number, is_list_of_str, to_boolean, to_list, \
-        dict2map, type_as_str, safe_repr
+        dict2map, type_as_str
 from unic import unic
 from encoding import decode_output, encode_output
 from robotversion import get_version, get_java_version
=======================================
--- /trunk/src/robot/utils/robottypes.py        Wed Apr 14 02:43:31 2010
+++ /trunk/src/robot/utils/robottypes.py        Thu Apr 15 05:30:46 2010
@@ -129,8 +129,3 @@
         ret = _printable_type_mapping[ret]
     return ret

-def safe_repr(item):
-    try:
-        return unic(repr(item))
-    except UnicodeError:
-        return repr(unic(item))


--
To unsubscribe, reply using "remove me" as the subject.

Reply via email to