Update of /cvsroot/pythoncard/PythonCard
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16943
Modified Files:
util.py
Log Message:
Protect against the case where one of the parameters is 'None'
e.g. in the resourceEditor before the resource file has been saved
Index: util.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/util.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** util.py 5 Oct 2004 17:37:40 -0000 1.36
--- util.py 11 May 2005 09:17:21 -0000 1.37
***************
*** 387,390 ****
--- 387,395 ----
# I made a few changes below to get rid of redundant leading ..
def relativePath(p1, p2):
+ # AGT 2005-05-10
+ # Protect against the case where one of the parameters is 'None'
+ # e.g. in the resourceEditor before the resource file has been saved
+ if not pi: p1 = ''
+ if not p2: p2 = ''
(common,l1,l2) = commonpath(pathsplit(p1), pathsplit(p2))
p = []
|