]> git.sven.stormbind.net Git - sven/scripts.git/commitdiff
Use python f-string for output formating
authorSven Hoexter <sven@stormbind.net>
Fri, 27 Aug 2021 12:18:24 +0000 (14:18 +0200)
committerSven Hoexter <sven@stormbind.net>
Fri, 27 Aug 2021 12:18:24 +0000 (14:18 +0200)
home/portalmonitor.py

index 2264206090735e746dd2c0aabfb8fad028df3f2a..1316b2f6807d50233c13f511c81767d56e040091 100755 (executable)
@@ -75,7 +75,7 @@ if isDaylight(conf['config'].getfloat('lat'), conf['config'].getfloat('lon'),
                                    conf['config']['stationId'])
 
     if options.printStatus:
-        print('Current Power: ' + str(currentPower))
+        print(f"Current Power: {currentPower}")
 
     if currentPower == 0:
         print('Error: Power dropped to 0 but we should have daylight!')