From 1d4ae20433c43c308a8d4ecca40b26aa0496c560 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 4 Mar 2013 00:41:54 +0000 Subject: [PATCH] skip error msg if no file exists svn: r21544 --- gramps/gen/recentfiles.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gramps/gen/recentfiles.py b/gramps/gen/recentfiles.py index 4be2a8754..d09549873 100644 --- a/gramps/gen/recentfiles.py +++ b/gramps/gen/recentfiles.py @@ -218,8 +218,11 @@ class RecentParser(object): def __init__(self): 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 + # Python3's expat wants bytes, Python2's wants a string. try: if sys.version_info[0] < 3: xml_file = open(os.path.expanduser(GRAMPS_FILENAME), "r")