def process_event(self, cmd, value, ip, member_info): if cmd == "HELO_SELFTEST": import unittest from notificationCenter import notificationCenterTestCase runner = unittest.TextTestRunner() log_warning("Starting SelfTest") suite = unittest.makeSuite(notificationCenterTestCase,'test') runner.run(suite)
def createBugReport(self): repoUser = self.mt.options[u"repo_user"] repoName = self.mt.options[u"repo_name"] if repoUser and repoName: url = "https://github.com/%s/%s/issues/new" % (repoUser, repoName) if url != None: webbrowser.open(url, new=2) else: log_warning("No Lunchinator GitHub repository specified.") QMessageBox.critical(self, "No Repository", "No Lunchinator GitHub repository specified.", buttons=QMessageBox.Ok, defaultButton=QMessageBox.Ok)
def update_reports(self): self.refresh_btn.setEnabled(False) repoUser = self.mt.options[u"repo_user"] repoName = self.mt.options[u"repo_name"] if repoUser and repoName: log_debug("Fetching issues from repository %s/%s" % (repoUser, repoName)) thread = DownloadThread(self, "https://api.github.com/repos/%s/%s/issues?state=open" % (repoUser, repoName)) thread.finished.connect(thread.deleteLater) thread.error.connect(self.errorDownloadingIssues) thread.success.connect(self.downloadedIssues) thread.start() else: log_warning("No Lunchinator GitHub repository specified.")