Commits

Yuki KODAMA  committed a0aefb8

avoid to launch app when the module is loaded

  • Participants
  • Parent commits b1cfb55

Comments (0)

Files changed (1)

File feedeater.pyw

             notice.add_header('Notification-Text', desc)
             self.send(notice.encode())
 
-QSettings.setDefaultFormat(QSettings.IniFormat)
+if __name__ == "__main__":
+    QSettings.setDefaultFormat(QSettings.IniFormat)
 
-app = QApplication(sys.argv)
-app.setApplicationName('FeedEater')
-app.setApplicationVersion(__version__)
-app.setOrganizationName('FeedEater')
-app.setOrganizationDomain('endflow.net')
-dlg = MainDialog()
-dlg.show()
-sys.exit(app.exec_())
+    app = QApplication(sys.argv)
+    app.setApplicationName('FeedEater')
+    app.setApplicationVersion(__version__)
+    app.setOrganizationName('FeedEater')
+    app.setOrganizationDomain('endflow.net')
+    dlg = MainDialog()
+    dlg.show()
+    sys.exit(app.exec_())