Skip to content

Commit

Permalink
FIX code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mgmax committed Dec 28, 2023
1 parent 13a3b1f commit 57c0e5c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FabLabKasse/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,18 +333,18 @@ def autoRebootOnUpdates(self):
Assumption: This function is only called directly after a successful payment, before the user has any chance to add new things to the cart or even start a new payment.
"""

# Determine if reboot/restart is needed
if os.path.isfile("/var/run/reboot-required"):
restart_type = "reboot"
elif time.monotonic() > self.startup_time + 48 * 3600:
restart_type = "restart"
else:
restart_type = None

if restart_type is None:
return

dialog = QtWidgets.QMessageBox(self)
dialog.setWindowModality(QtCore.Qt.WindowModal)
dialog.setText(
Expand All @@ -356,7 +356,7 @@ def autoRebootOnUpdates(self):
dialog.setEscapeButton(QtWidgets.QMessageBox.Cancel)
if dialog.exec_() != QtWidgets.QMessageBox.Ok:
return

self.do_restart(restart_type)

def serviceMode(self):
Expand Down

0 comments on commit 57c0e5c

Please sign in to comment.