diff --git a/pym/cl_client.py b/pym/cl_client.py index 44d4ab3..7bdc345 100644 --- a/pym/cl_client.py +++ b/pym/cl_client.py @@ -232,7 +232,7 @@ org.kde.kdialog.ProgressDialog' os.system(env + '/usr/bin/qdbus %s %s maximum %d >/dev/null'\ %(self.kdialog,self.suffixSet, 100)) self.max = max - self.kmax = max / 100.0 + self.kmax = (max / 100.0) or 1.0 def setTitle(self,title): @@ -275,8 +275,6 @@ class RsyncProgressBar: при необходимости вывода progressbar ''' - # получение номера передаваемого файла из инф потока rsync - senderre = re.compile("\[sender\] i=(\d+) ", re.S) # получение номера получаемого файла из потока rsync receiverre = re.compile("recv_generator\(.+,([0-9]+)\)", re.S) pipe = None @@ -327,12 +325,6 @@ class RsyncProgressBar: s = self.pipe.stdout.readline() if len(s) == 0: break - q = self.senderre.search(s) - if q: - maximum = int(q.groups()[0]) - if self.maximum < maximum: - self.maximum = maximum - continue q = self.receiverre.search(s) if q: if not self.copyStarting: @@ -2880,7 +2872,7 @@ or ld_bind_dn or ld_bind_pw") --filter="P /.mozilla/firefox/*/Cache" \ --filter="P /.cache" \ --filter="P /.opera/cache" \ ---filter="P /FTP" -a -x -v -v -v -v %s/ %s/' %(homeProfile,userHome) +--filter="P /FTP" -a -x -v -v -v %s/ %s/' %(homeProfile,userHome) elif sync == "logout": if os.path.exists(userHome) and os.listdir(userHome) and\ os.path.exists(homeProfile): @@ -2897,7 +2889,7 @@ or ld_bind_dn or ld_bind_pw") --exclude="/.mozilla/firefox/*/Cache" \ --exclude="/.cache" \ --exclude="/.opera/cache" \ --a -x -v -v -v -v %s/ %s/'%(userHome,homeProfile) +-a -x -v -v -v %s/ %s/'%(userHome,homeProfile) else: self.printERROR(_("Method syncUser: option sync=%s incorrect")\ %str(sync)) @@ -2927,11 +2919,11 @@ or ld_bind_dn or ld_bind_pw") if numfiles is False: if os.path.exists(configFileName): os.remove(configFileName) - numfiles = 1 + numfiles = 0 else: numfiles = int(numfiles) except: - numfiles = 1 + numfiles = 0 rsync.maximum = numfiles if progress: rsync.run()