aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()