From 544e2baa803d9321835cf165e71c236c2adfba4f Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 7 Apr 2008 17:27:10 +0000 Subject: [PATCH] - Fix the ftp byterange port problem: - Resolves: bug#419241 - Fixup the progress UI: - add function for total progress - add total progress percentagee current download line - add rate to current download line - use dead space when finished downloading - don't confuse download rate on regets. --- python-urlgrabber.spec | 4 ++-- urlgrabber-ftp-port.patch | 16 ++++++++++++++++ urlgrabber-progress-ui.patch | 8 ++++---- 3 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 urlgrabber-ftp-port.patch diff --git a/python-urlgrabber.spec b/python-urlgrabber.spec index 05cc656..2fe2c9c 100644 --- a/python-urlgrabber.spec +++ b/python-urlgrabber.spec @@ -28,8 +28,8 @@ authentication, proxies and more. %patch0 -p0 %patch1 -p1 %patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%patch3 -p0 +%patch4 -p0 %build python setup.py build diff --git a/urlgrabber-ftp-port.patch b/urlgrabber-ftp-port.patch new file mode 100644 index 0000000..7382f3c --- /dev/null +++ b/urlgrabber-ftp-port.patch @@ -0,0 +1,16 @@ +Index: urlgrabber/byterange.py +=================================================================== +RCS file: /home/groups/urlgrabber/cvs-root/urlgrabber/urlgrabber/byterange.py,v +retrieving revision 1.12 +diff -u -r1.12 byterange.py +--- urlgrabber/byterange.py 20 Jul 2006 20:15:58 -0000 1.12 ++++ urlgrabber/byterange.py 13 Mar 2008 18:48:56 -0000 +@@ -272,6 +272,8 @@ + host, port = splitport(host) + if port is None: + port = ftplib.FTP_PORT ++ else: ++ port = int(port) + + # username/password handling + user, host = splituser(host) diff --git a/urlgrabber-progress-ui.patch b/urlgrabber-progress-ui.patch index c841436..ce911f1 100644 --- a/urlgrabber-progress-ui.patch +++ b/urlgrabber-progress-ui.patch @@ -1,10 +1,10 @@ -Index: progress.py +Index: urlgrabber/progress.py =================================================================== RCS file: /home/groups/urlgrabber/cvs-root/urlgrabber/urlgrabber/progress.py,v retrieving revision 1.7 -diff -u -r1.7 progress.py ---- progress.py 19 Aug 2005 21:59:07 -0000 1.7 -+++ progress.py 7 Apr 2008 16:33:30 -0000 +diff -u -r1.7 urlgrabber/progress.py +--- urlgrabber/progress.py 19 Aug 2005 21:59:07 -0000 1.7 ++++ urlgrabber/progress.py 7 Apr 2008 16:33:30 -0000 @@ -83,6 +83,17 @@ def _do_end(self, amount_read, now=None): pass