[Python-checkins] python/dist/src/Tools/pynche Main.py,2.22,2.23
bwarsaw at users.sourceforge.net
bwarsaw at users.sourceforge.net
Tue Sep 2 21:15:52 EDT 2003
Update of /cvsroot/python/python/dist/src/Tools/pynche
In directory sc8-pr-cvs1:/tmp/cvs-serv8837
Modified Files:
Main.py
Log Message:
Fix for SF bug #780996, crash when no .pynche file exists and -d
option is not given. If dbfile isn't given and can't be retrieved
from the optionsdb, just initialize it to the first element in
RGB_TXT.
Backport candidate.
Index: Main.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/pynche/Main.py,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -d -r2.22 -r2.23
*** Main.py 21 Oct 2002 14:23:48 -0000 2.22
--- Main.py 3 Sep 2003 03:15:50 -0000 2.23
***************
*** 47,51 ****
"""
! __version__ = '1.4'
import sys
--- 47,51 ----
"""
! __version__ = '1.4.1'
import sys
***************
*** 128,135 ****
# in the .pynche file.
if dbfile is None:
! dbfile = s.optiondb()['DBFILE']
# find a parseable color database
colordb = None
files = RGB_TXT[:]
while colordb is None:
try:
--- 128,137 ----
# in the .pynche file.
if dbfile is None:
! dbfile = s.optiondb().get('DBFILE')
# find a parseable color database
colordb = None
files = RGB_TXT[:]
+ if dbfile is None:
+ dbfile = files.pop()
while colordb is None:
try:
More information about the Python-checkins
mailing list