diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2011-02-22 05:10:31 +0100 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2011-02-22 05:10:31 +0100 |
commit | 6cc86c66a15ea305b453e5d1b2d62e4d974f579d (patch) | |
tree | 513c64997bb9bb06d1ca6d9d111b369078cf1544 /src | |
parent | 20a9c4ddff4e597bc67f6cc232890ea946b38692 (diff) | |
download | abrt-6cc86c66a15ea305b453e5d1b2d62e4d974f579d.tar.gz abrt-6cc86c66a15ea305b453e5d1b2d62e4d974f579d.tar.xz abrt-6cc86c66a15ea305b453e5d1b2d62e4d974f579d.zip |
abrt-action-install-debuginfo.py: do not truncate package names on output
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/plugins/abrt-action-install-debuginfo.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/abrt-action-install-debuginfo.py b/src/plugins/abrt-action-install-debuginfo.py index 72f56a9d..d09f00f5 100755 --- a/src/plugins/abrt-action-install-debuginfo.py +++ b/src/plugins/abrt-action-install-debuginfo.py @@ -123,7 +123,7 @@ class MyDownloadCallback(DownloadBaseCallback): DownloadBaseCallback.__init__(self) def updateProgress(self, name, frac, fread, ftime): - pct = int( frac*100 ) + pct = int(frac * 100) if pct == self.last_pct: log2("percentage is the same, not updating progress") return @@ -131,18 +131,18 @@ class MyDownloadCallback(DownloadBaseCallback): self.last_pct = pct # if run from terminal we can have a fancy output if sys.stdout.isatty(): - sys.stdout.write("\033[sDownloading (%i of %i) %.30s : %.3s %%\033[u" + sys.stdout.write("\033[sDownloading (%i of %i) %s: %.3s %%\033[u" % (self.downloaded_pkgs + 1, self.total_pkgs, name, pct) ) if pct == 100: - print _("Downloading (%i of %i) %.30s : %.3s %%" + print _("Downloading (%i of %i) %s: %.3s %%" % (self.downloaded_pkgs + 1, self.total_pkgs, name, pct) ) # but we want machine friendly output when spawned from abrt-server else: - print (_("Downloading (%i of %i) %.30s : %.3s %%") + print (_("Downloading (%i of %i) %s: %.3s %%") % (self.downloaded_pkgs + 1, self.total_pkgs, name, pct) ) @@ -222,7 +222,7 @@ class DebugInfoDownload(YumBase): # connect our progress update callback dnlcb = MyDownloadCallback(total_pkgs) - self.repos.setProgressBar( dnlcb ) + self.repos.setProgressBar(dnlcb) log1("%i files in %i packages" % (len(files), total_pkgs)) @@ -431,7 +431,7 @@ if __name__ == "__main__": verbose += 1 elif opt == "-y": noninteractive = True - elif opt in ("--core","-c"): + elif opt in ("--core", "-c"): core = arg elif opt in ("--cache"): cachedir = arg |