diff options
author | papoteur-mga <yves.brungard_git@gadz.org> | 2014-10-28 20:24:44 +0100 |
---|---|---|
committer | papoteur-mga <yves.brungard_git@gadz.org> | 2014-10-28 20:24:44 +0100 |
commit | 542f88cc573cdc0f93314218b4765c0f1a62c75c (patch) | |
tree | dfc9555cb0c658cf25bc8ebe97578ebca206c110 /mageiaSync | |
parent | 3e7cd496046cfd109c278bd0e9488e2b75bc280b (diff) | |
download | MageiaSync-542f88cc573cdc0f93314218b4765c0f1a62c75c.tar MageiaSync-542f88cc573cdc0f93314218b4765c0f1a62c75c.tar.gz MageiaSync-542f88cc573cdc0f93314218b4765c0f1a62c75c.tar.bz2 MageiaSync-542f88cc573cdc0f93314218b4765c0f1a62c75c.tar.xz MageiaSync-542f88cc573cdc0f93314218b4765c0f1a62c75c.zip |
Correction of isosize transmission for numbers >4G
Diffstat (limited to 'mageiaSync')
-rw-r--r-- | mageiaSync/mageiaSyncExt.py | 12 | ||||
-rw-r--r-- | mageiaSync/mageiasync.py | 6 |
2 files changed, 9 insertions, 9 deletions
diff --git a/mageiaSync/mageiaSyncExt.py b/mageiaSync/mageiaSyncExt.py index e93ab1e..135d80c 100644 --- a/mageiaSync/mageiaSyncExt.py +++ b/mageiaSync/mageiaSyncExt.py @@ -14,7 +14,7 @@ class checkThread(QThread): md5Signal = pyqtSignal(int) sha1Signal= pyqtSignal(int) dateSignal=pyqtSignal(int) - sizeSignal=pyqtSignal(int,int) + sizeFinalSignal=pyqtSignal(int,str) checkStartSignal=pyqtSignal(int) def __init__(self, parent=None): @@ -78,7 +78,7 @@ class checkThread(QThread): def run(self): signal=200+self.isoIndex isoSize=QFileInfo(str(self.destination)+'/'+self.path+'/' +self.name).size() - self.sizeSignal.emit(signal, isoSize) + self.sizeFinalSignal.emit(signal, '{:,}'.format(isoSize).replace(',',' ')) signal=500+self.isoIndex self.checkStartSignal.emit(signal) checkMd5=self.processSum('md5') @@ -100,7 +100,7 @@ class syncThread(QThread): endSignal=pyqtSignal(int) remainSignal=pyqtSignal(str) checkSignal=pyqtSignal(int) - sizeSignal=pyqtSignal(int) + sizeSignal=pyqtSignal(str) lvM=pyqtSignal(str) def __init__(self, parent=None): @@ -169,7 +169,7 @@ class syncThread(QThread): progress= eval(progressL[0]) self.progressSignal.emit(progress) if len(sizeB) != 0: - self.sizeSignal.emit(eval(sizeB[0].replace(",",""))) + self.sizeSignal.emit(sizeB[0].replace(","," ")) else: if (len(buf) !=0): self.lvM.emit(buf.rstrip()) @@ -192,8 +192,8 @@ class syncThread(QThread): self.endSignal.emit(0) self.speedSignal.emit(0) self.progressSignal.emit(0) - self.sizeSignal.emit(0) - self.remainSignal.emit("") + self.sizeSignal.emit(u'0') + self.remainSignal.emit(u'0') self.stopped=False self.list=[] self.quit() diff --git a/mageiaSync/mageiasync.py b/mageiaSync/mageiasync.py index 07e32da..4faf149 100644 --- a/mageiaSync/mageiasync.py +++ b/mageiaSync/mageiasync.py @@ -144,7 +144,7 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): def setSize(self, size): # Update the size field - self.Lsize.setText('{:n}'.format(size).replace(","," ")+" bytes") + self.Lsize.setText(size+" bytes") def setRemain(self,remainTime): content=QtCore.QTime.fromString(remainTime,"h:mm:ss") @@ -159,7 +159,7 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): self.checkThreads[-1].md5Signal.connect(self.md5Check) self.checkThreads[-1].sha1Signal.connect(self.sha1Check) self.checkThreads[-1].dateSignal.connect(self.dateCheck) - self.checkThreads[-1].sizeSignal.connect(self.sizeUpdate) + self.checkThreads[-1].sizeFinalSignal.connect(self.sizeUpdate) self.checkThreads[-1].checkStartSignal.connect(self.checkStart) self.checkThreads[-1].start() @@ -200,7 +200,7 @@ class IsosViewer(QMainWindow, mageiaSyncUI.Ui_mainWindow): def sizeUpdate(self,signal,isoSize): col=(int)(signal/100) row=signal-col*100 - self.model.setData(self.model.index(row, col, QtCore.QModelIndex()), '{:n}'.format(isoSize).replace(","," ")) + self.model.setData(self.model.index(row, col, QtCore.QModelIndex()), isoSize) def syncEnd(self, rc): if rc==1: |