From 194408de5a83c75d1a89e3e400f85288bee3f1a3 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Mon, 12 Oct 2009 12:55:23 +0000 Subject: [PATCH] - Add .part to constants - urlgrabber does not send the url anymore it returns the given file to the progress class, so .part suffix should be removed --- pisi/constants.py | 2 ++ pisi/fetcher.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pisi/constants.py b/pisi/constants.py index f101d93c..f96d1e5b 100644 --- a/pisi/constants.py +++ b/pisi/constants.py @@ -50,6 +50,8 @@ class Constants: # suffix for lzma self.__c.lzma_suffix = ".lzma" + self.__c.partial_suffix = ".part" + # suffix for auto generated debug packages self.__c.debug_name_suffix = "-dbginfo" self.__c.debug_file_suffix = ".debug" diff --git a/pisi/fetcher.py b/pisi/fetcher.py index a0a37eb5..0d48d6d3 100644 --- a/pisi/fetcher.py +++ b/pisi/fetcher.py @@ -54,7 +54,7 @@ class UIHandler: def start(self, archive, url, basename, size, text): if os.path.exists(archive): self.exist_size = os.path.getsize(archive) - self.filename = basename + self.filename = util.remove_suffix(ctx.const.partial_suffix, basename) self.url = url self.basename = basename self.total_size = size or 0 @@ -114,7 +114,7 @@ class Fetcher: self.url = url self.destdir = destdir self.archive_file = os.path.join(self.destdir, self.url.filename()) - self.partial_file = self.archive_file + '.part' + self.partial_file = self.archive_file + ctx.const.partial_suffix self.progress = None util.check_dir(self.destdir)