m bracket + syntax fix + installation error fix and verboseness

Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
Mattias Andrée 2012-12-22 00:16:43 +01:00
parent ec73c4dd1d
commit 49b3f80f8a
3 changed files with 13 additions and 10 deletions

View file

@ -1529,9 +1529,9 @@ to your @file{~/.bashrc} file.
@example
[[ ! "$COLORTERM" = "" ]] &&
function ponysay
{
@{
exec ponysay "$@@" | cat | cat | cat | cat
}
@}
@end example
@end cartouche

View file

@ -198,7 +198,7 @@ class Ponysay():
def share(file):
return [parsefile(item) + file for item in [
return [(parsefile(item) + file) for item in [
'$XDG_DATA_HOME/ponysay/',
'$HOME/.local/share/ponysay/',
'/usr/share/ponysay/',

View file

@ -490,13 +490,6 @@ class Setup():
if fileout is not None: fileout.close()
if filein is not None: filein .close()
for sharedir in [sharedir[0] for sharedir in sharedirs]:
for sharefile in os.listdir(conf[sharedir]):
if sharefile.endswith('.pony') and (sharefile != '.pony'):
for toolcommand in ('--dimensions', '--metadata'):
Popen(['./ponysay-tool.py', toolcommand, conf[sharedir]], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
break
for shell in [item[0] for item in shells]:
if conf[shell] is not None:
for command in commands:
@ -542,6 +535,16 @@ class Setup():
finally:
if ponymap is not None:
ponymap.close()
for sharedir in [sharedir[0] for sharedir in sharedirs]:
if os.path.isdir(sharedir):
for sharefile in os.listdir(sharedir):
if sharefile.endswith('.pony') and (sharefile != '.pony'):
sharefile = sharedir + '/' + sharefile
for toolcommand in ('--dimensions', '--metadata'):
print('%s, %s, %s' % ('./ponysay-tool.py', toolcommand, sharefile))
Popen(['./ponysay-tool.py', toolcommand, sharefile], stdin=PIPE, stdout=PIPE, stderr=PIPE).communicate()
print()