[Python-checkins] python/dist/src/Tools/pynche Main.py, 2.22, 2.22.14.1

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Tue Sep 2 21:23:47 EDT 2003


Update of /cvsroot/python/python/dist/src/Tools/pynche
In directory sc8-pr-cvs1:/tmp/cvs-serv10250
Modified Files:
 Tag: release23-maint
	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.
(backported)
Index: Main.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Tools/pynche/Main.py,v
retrieving revision 2.22
retrieving revision 2.22.14.1
diff -C2 -d -r2.22 -r2.22.14.1
*** Main.py	21 Oct 2002 14:23:48 -0000	2.22
--- Main.py	3 Sep 2003 03:23:44 -0000	2.22.14.1
***************
*** 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

AltStyle によって変換されたページ (->オリジナル) /