Don't force integer formatting in AFM._check_target_deflection messages.
authorW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 21:14:17 +0000 (16:14 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 23 Jan 2012 21:14:17 +0000 (16:14 -0500)
We're about to raise an exception anyway, so there's no need to be
overly picky here.

pyafm/afm.py

index 75df11dd5f114412301806b1e938409cf4d31869..b346275dc37d302c2f5b60078818bf6fc6c0a10e 100644 (file)
@@ -154,12 +154,12 @@ class AFM (object):
         defc = self.piezo._deflection_channel()
         max_def = defc.get_maxdata()
         if deflection > max_def:
-            _LOG.error(('requested setpoint ({:d} bits) is larger than the '
-                        'maximum deflection value of {:d} bits'
+            _LOG.error(('requested setpoint ({} bits) is larger than the '
+                        'maximum deflection value of {} bits'
                         ).format(deflection, max_def))
             raise ValueError(setpoint)
         elif deflection < 0:
-            _LOG.error(('requested setpoint ({:d} bits) is less than the '
+            _LOG.error(('requested setpoint ({} bits) is less than the '
                         'minimum deflection value of 0 bits'
                         ).format(deflection))
             raise ValueError(setpoint)