[Pkg-privacy-commits] [tails-installer] 04/13: Fix module interconnection for updating the release list
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:28:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to tag 3.95.0
in repository tails-installer.
commit 8b49e97890f54f655da16e6a4e48920b03c481ba
Author: Martin Briza <mbriza at redhat.com>
Date: Tue Apr 26 12:26:38 2016 +0200
Fix module interconnection for updating the release list
---
liveusb/grabber.py | 4 ++--
liveusb/gui.py | 6 ++++--
liveusb/releases.py | 5 ++---
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/liveusb/grabber.py b/liveusb/grabber.py
index ec31695..ace31be 100644
--- a/liveusb/grabber.py
+++ b/liveusb/grabber.py
@@ -1,11 +1,11 @@
-from liveusb import LiveUSBError
-
import subprocess
import os
import sys
import requests
import tempfile
+from liveusb import _
+
from PyQt5.QtCore import QStandardPaths
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 5522390..e5cc9dc 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -668,7 +668,6 @@ class DataUpdateThread(QThread):
def run(self):
get_fedora_flavors()
- self.data.fillReleases()
class LiveUSBData(QObject):
@@ -700,10 +699,12 @@ class LiveUSBData(QObject):
self.live.detect_removable_drives(callback=self.USBDeviceCallback)
- #QTimer.singleShot(0, self.updateThread.start)
+ self.updateThread.finished.connect(self.fillReleases)
+ QTimer.singleShot(0, self.updateThread.start)
@pyqtSlot()
def fillReleases(self):
+ print ("BAM")
self.releaseModel.beginResetModel()
self.releaseData = []
@@ -715,6 +716,7 @@ class LiveUSBData(QObject):
))
self.releaseModel.endResetModel()
+ self.releaseProxyModel.invalidate()
def USBDeviceCallback(self):
tmpDrives = []
diff --git a/liveusb/releases.py b/liveusb/releases.py
index 8935119..ea61370 100644
--- a/liveusb/releases.py
+++ b/liveusb/releases.py
@@ -3,10 +3,9 @@
import re
import traceback
-#todo port away from urlgrabber too
-from grabber import urlread
from pyquery import pyquery
+from liveusb.grabber import urlread
from liveusb import _
from PyQt5.QtCore import QDateTime
@@ -32,7 +31,7 @@ def getSHA(url):
filename = url.split('/')[-1]
try:
d = pyquery.PyQuery(urlread(baseurl))
- except URLGrabError:
+ except LiveUSBError:
return ''
checksum = ''
for i in d.items('a'):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git
More information about the Pkg-privacy-commits
mailing list