aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2015-02-28 09:53:57 +0100
committerPapoteur <papoteur@mageialinux-online.org>2015-02-28 09:53:57 +0100
commitc9286400167ccc4dbafda3ea01e42c538c3012f5 (patch)
tree029dac762c711c2c6908873be49cb9120f13df47
parent02321c5aa2f0134667fd1690108022870da0968a (diff)
downloadMageiaSync-c9286400167ccc4dbafda3ea01e42c538c3012f5.tar
MageiaSync-c9286400167ccc4dbafda3ea01e42c538c3012f5.tar.gz
MageiaSync-c9286400167ccc4dbafda3ea01e42c538c3012f5.tar.bz2
MageiaSync-c9286400167ccc4dbafda3ea01e42c538c3012f5.tar.xz
MageiaSync-c9286400167ccc4dbafda3ea01e42c538c3012f5.zip
Correction of a bug on translation function in renaming.
-rw-r--r--mageiaSync/mageiaSyncExt.py4
-rw-r--r--mageiaSync/mageiasync.py6
2 files changed, 7 insertions, 3 deletions
diff --git a/mageiaSync/mageiaSyncExt.py b/mageiaSync/mageiaSyncExt.py
index 8440d94..2bd2e87 100644
--- a/mageiaSync/mageiaSyncExt.py
+++ b/mageiaSync/mageiaSyncExt.py
@@ -212,9 +212,9 @@ def rename(directory,oldRelease,newRelease):
if process.returncode != None:
if process.returncode!=0:
item=process.stderr.readline().rstrip()
- return 'Error ', item
+ return 1, item
break
- return tr("Success in renaming")
+ return 0 #"Success in renaming"
class findIsos(QThread):
endSignal=pyqtSignal(int)
diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py
index f201625..23ba885 100644
--- a/mageiaSync/mageiasync.py
+++ b/mageiaSync/mageiasync.py
@@ -372,7 +372,11 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow):
self.rd.chooseDir.setText(self.destination)
answer=self.rd.exec_()
if answer:
- returnMsg=mageiaSyncExt.rename(self.rd.chooseDir.text(),self.rd.oldRelease.text(),str(self.rd.newRelease.text()))
+ returncode=mageiaSyncExt.rename(self.rd.chooseDir.text(),self.rd.oldRelease.text(),str(self.rd.newRelease.text()))
+ if returncode==1:
+ returnMsg="Error in renaming"
+ else:
+ returnMsg=self.tr("Success in renaming")
self.lvMessage(returnMsg)
self.rd.close()