[chirp_devel] How Would I Display 'image_version' and 'radio_version'?
Hi group,
How would I go about getting the 'image_version' and 'radio_version' to display within this error message?
if image_version != radio_version: raise errors.RadioError("Upload finished, but the 'Other Settings' " "could not be sent because the firmware " "version of the image does not match that " "of the radio")
Something like...
Image Version: BFB293 Radio Version: BFB299
Thanks, Jim KC9HI
How would I go about getting the 'image_version' and 'radio_version' to display within this error message?
Might be cleanest to separate out the building of the string from the raise. Something like:
msg = ("Upload finished, but the 'Other Settings' " "could not be sent because the firmware " "version of the image (%s) does not match " "that of the radio (%s).") raise errors.RadioError(msg % (image_version, radio_version))
On Sat, May 4, 2013 at 5:05 PM, Dan Smith dsmith@danplanet.com wrote:
How would I go about getting the 'image_version' and 'radio_version' to display within this error message?
Might be cleanest to separate out the building of the string from the raise. Something like:
msg = ("Upload finished, but the 'Other Settings' " "could not be sent because the firmware " "version of the image (%s) does not match " "that of the radio (%s).") raise errors.RadioError(msg % (image_version, radio_version))
Slick. Just what I was looking for.
Jim
participants (2)
-
Dan Smith
-
Jim Unroe