sys.exit(1)
-if __name__ == "__main__":
+def main():
+ """The main function."""
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGUSR1, signal_handler)
editor = None
pkg_state = {}
other_state = {}
+ global PKG_STATE, OTHER_STATE
PKG_STATE = pkg_state
OTHER_STATE = other_state
other_state["USER"] = os.environ["USER"]
log_print("Canceled.", other_state=other_state)
else:
log_print("No packages to update, done.", other_state=other_state)
+
+
+if __name__ == "__main__":
+ main()