bid_monkey password in conf file patch

A rare treat, some python code. This is for bid_monkey (an ebay bidding/sniping tool).

This allows you to store your ebay password in ~/.bidmonkeyrc (chmod'ed 700 of course) rather than have it visible to 'ps'. This diff is against v2.1 and as I am no python expert, I give no guarantee as to whether it works.


[x bid_monkey_v2]$ rcsdiff ./bid_monkey.py 
===================================================================
RCS file: ./RCS/bid_monkey.py,v
retrieving revision 1.1
diff -r1.1 ./bid_monkey.py
123c123
<     if o in ("-p", "--password")  : monkey.set_password(a)
---
> #    if o in ("-p", "--password")  : monkey.set_password(a)
127a128,139
> 
> # added by JP - get my password form ~/.bidmonkeyrc if possible
> rcfile = os.environ['HOME'] + '/.bidmonkeyrc'
> try:
>     input = open(rcfile, 'r')
> except IOError:
>     for o, a in opts:
>       if o in ("-p", "--password")  : monkey.set_password(a)
> else:
>     ebaypass = input.readline()
>     input.close
>     monkey.set_password(ebaypass)