aboutsummaryrefslogtreecommitdiffstats
path: root/mageiasync
diff options
context:
space:
mode:
authorpapoteur-mga <yves.brungard_git@gadz.org>2014-09-14 10:57:02 +0200
committerpapoteur-mga <yves.brungard_git@gadz.org>2014-09-14 10:57:02 +0200
commit9ab4874de65cdb032241a62b9b810d725368c2d0 (patch)
treeb4b800425059305ee8a887d3a44b88420cf621fa /mageiasync
parent6669257a081766ab213e2956bef00c0d6e3a4ce5 (diff)
downloadMageiaSync-9ab4874de65cdb032241a62b9b810d725368c2d0.tar
MageiaSync-9ab4874de65cdb032241a62b9b810d725368c2d0.tar.gz
MageiaSync-9ab4874de65cdb032241a62b9b810d725368c2d0.tar.bz2
MageiaSync-9ab4874de65cdb032241a62b9b810d725368c2d0.tar.xz
MageiaSync-9ab4874de65cdb032241a62b9b810d725368c2d0.zip
Update the function to detect if parameters are already set or not, which did not work
Diffstat (limited to 'mageiasync')
-rw-r--r--mageiasync/mageiasync.py38
1 files changed, 10 insertions, 28 deletions
diff --git a/mageiasync/mageiasync.py b/mageiasync/mageiasync.py
index 2e15151..b6737c8 100644
--- a/mageiasync/mageiasync.py
+++ b/mageiasync/mageiasync.py
@@ -211,39 +211,21 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
def prefsInit(self):
# Load the parameters at first
params=QtCore.QSettings("Mageia","mageiaSync")
- try:
+ self.release=params.value("release", type="QString")
# the parameters already initilised?
- self.user=params.value("user", type="QString")
- except:
+ if self.release =="":
# Values are not yet set
self.pd=prefsDialog()
# Set values which are already defined
- try:
- self.pd.release.setText(params.value("release", type="QString"))
- except:
- pass
- try:
- self.pd.password.setText(params.value("password", type="QString"))
- except:
- pass
- try:
- self.pd.location.setText(params.value("location", type="QString"))
- except:
- pass
- try:
- self.pd.selectDest.setText(params.value("destination", type="QString"))
- except:
- self.pd.selectDest.setText(QtCore.QDir.currentPath())
- try:
- self.pd.bwl.setText(params.value("bwl", type="QInt"))
- except:
- pass
- try:
- self.pd.password.setText(params.value("password", type="QString"))
- except:
- pass
+ self.pd.user.setText(params.value("user", type="QString"))
+ self.pd.password.setText(params.value("password", type="QString"))
+ self.pd.location.setText(params.value("location", type="QString"))
+ self.pd.selectDest.setText(params.value("destination", type="QString"))
+ self.pd.selectDest.setText(QtCore.QDir.currentPath())
+ self.pd.bwl.setValue(params.value("bwl", type="int"))
+ self.pd.password.setText(params.value("password", type="QString"))
answer=self.pd.exec_()
- if answer:
+ if answer:
# Update params
params=QtCore.QSettings("Mageia","mageiaSync")
params.setValue("release", self.pd.release.text())