From 0d802b2d0157ab2497c9d2c8cd373272c4321f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Mon, 5 Nov 2012 19:10:52 +0100 Subject: [PATCH] bugs --- ponysay-tool.py | 2 +- ponysay.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ponysay-tool.py b/ponysay-tool.py index c92b7746..f2bcaa4e 100755 --- a/ponysay-tool.py +++ b/ponysay-tool.py @@ -327,7 +327,7 @@ class PonysayTool(): infowidth = Backend.len(max(ponyinfo, key = Backend.len)) print(getprint(ponyinfo, infowidth, infoheight, termw, termh, x, y), end='') else: - print(getprint(pony, ponywidth, ponyheight, panelx, termh, (panelx - ponywidth) // 2, (termh - ponyheight) // 2), end='') + print(getprint(pony, ponywidth, ponyheight, panelx, termh, x + (panelx - ponywidth) // 2, y + (termh - ponyheight) // 2), end='') printpanel = -1 if printpanel == -1: diff --git a/ponysay.py b/ponysay.py index 7bd94c49..c7a58fd4 100755 --- a/ponysay.py +++ b/ponysay.py @@ -342,6 +342,8 @@ class Ponysay(): self.ponyonly = True else: self.ponyonly = False + if (args.opts['-i'] is not None) or (args.opts['+i'] is not None): + args.message = '' self.restriction = args.opts['-r'] ## The stuff @@ -1849,7 +1851,7 @@ class Backend(): if self.infolevel == 2: self.message = Backend.formatInfo(info) elif self.infolevel == 1: - self.pony = Backend.formatInfo(info).replace('$'), ('$$') + self.pony = Backend.formatInfo(info).replace('$', '$$') else: info = info.split('\n') for line in info: