Skip to content

Commit

Permalink
utf-8 strings need to be encoded to work from cron (#156)
Browse files Browse the repository at this point in the history
* utf-8 strings need to be encoded to work from cron

* utf8 -> utf-8
  • Loading branch information
mmolhoek authored and tvoverbeek committed Sep 17, 2017
1 parent 971efef commit 1a0ea2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/papirus-temp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def main(argv):
sensor = LM75B()
tempC = '{c:.2f}'.format(c=sensor.getTempCFloat()) + u" \u00b0" + 'C'
tempF = '{c:.2f}'.format(c=sensor.getTempFFloat()) + u" \u00b0" + 'F'
print('Temperature from LM75B: ' + tempC + ' - ' + tempF)
print(('Temperature from LM75B: ' + tempC + ' - ' + tempF).encode('utf-8'))

# center the temperatures
(txtwidth, txtheight) = draw.textsize(tempC, font=font)
Expand Down

0 comments on commit 1a0ea2d

Please sign in to comment.