skip error msg if no file exists
svn: r21545
This commit is contained in:
parent
d01f7bf7df
commit
bf67b3e114
@ -218,8 +218,11 @@ class RecentParser(object):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.recent_files = []
|
self.recent_files = []
|
||||||
|
|
||||||
#Python3's expat wants bytes, Python2's wants a string.
|
if not os.path.exists(os.path.expanduser(GRAMPS_FILENAME)):
|
||||||
|
return # it's the first time gramps has ever been run
|
||||||
|
|
||||||
xml_file = None
|
xml_file = None
|
||||||
|
# Python3's expat wants bytes, Python2's wants a string.
|
||||||
try:
|
try:
|
||||||
if sys.version_info[0] < 3:
|
if sys.version_info[0] < 3:
|
||||||
xml_file = open(os.path.expanduser(GRAMPS_FILENAME), "r")
|
xml_file = open(os.path.expanduser(GRAMPS_FILENAME), "r")
|
||||||
|
Loading…
Reference in New Issue
Block a user