mirror of
https://github.com/erkin/ponysay
synced 2024-11-24 12:23:05 +00:00
bug fix (cuased by typo) with preperation for future options
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
87a4f422cf
commit
06b045475e
1 changed files with 8 additions and 10 deletions
18
ponysay.py
18
ponysay.py
|
@ -302,16 +302,14 @@ class Ponysay():
|
||||||
self.ponydirs = self.vtponydirs if self.linuxvt and not self.usekms else self.xponydirs
|
self.ponydirs = self.vtponydirs if self.linuxvt and not self.usekms else self.xponydirs
|
||||||
self.extraponydirs = self.extravtponydirs if self.linuxvt and not self.usekms else self.extraxponydirs
|
self.extraponydirs = self.extravtponydirs if self.linuxvt and not self.usekms else self.extraxponydirs
|
||||||
|
|
||||||
## Variadic variants of -f, +f and -q
|
## Variadic variants of -f, -q &c
|
||||||
if args.opts['--f'] is not None:
|
for sign in ('-', '+'):
|
||||||
if args.opts['-f'] is not None: args.opts['-f'] += args.opts['--f']
|
for letter in ('f', 'F', 'q', 'Q'):
|
||||||
else: args.opts['-f'] = args.opts['--f']
|
ssl = sign + sign + letter
|
||||||
if args.opts['++f'] is not None:
|
sl = sign + letter
|
||||||
if args.opts['+f'] is not None: args.opts['+f'] += args.opts['++f']
|
if (ssl in args.opts) and (args.opts[ssl] is not None):
|
||||||
else: args.opts['+f'] = args.opts['++F']
|
if args.opts[sl] is not None: args.opts[sl] += args.opts[ssl]
|
||||||
if args.opts['--q'] is not None:
|
else: args.opts[sl] = args.opts[ssl]
|
||||||
if args.opts['-q'] is not None: args.opts['-q'] += args.opts['--q']
|
|
||||||
else: args.opts['-q'] = args.opts['--q']
|
|
||||||
|
|
||||||
## Run modes
|
## Run modes
|
||||||
if args.opts['-h'] is not None: args.help()
|
if args.opts['-h'] is not None: args.help()
|
||||||
|
|
Loading…
Reference in a new issue