fixed another bug in the installation procedure (~/.gaphor can not be created from within the easyinstall process)

git-svn-id: file:///Users/arjan/backup/gaphor/gaphor/trunk@1205 a8418922-720d-0410-834f-a69b97ada669
This commit is contained in:
Arjan Molenaar 2007-04-10 08:52:50 +00:00
parent 65d8c5c389
commit fc48ea6efb
2 changed files with 4 additions and 4 deletions

View File

@ -104,8 +104,8 @@ class FileBackend(object):
def __init__(self):
pass
def get_filename(self, datadir):
if not os.path.exists(datadir):
def get_filename(self, datadir, create=False):
if create and not os.path.exists(datadir):
os.mkdir(datadir)
return os.path.join(datadir, self.RESOURCE_FILE)
@ -123,7 +123,7 @@ class FileBackend(object):
@resource is the Resource instance
@persistent is a list of persistent resource names.
"""
filename = self.get_filename(resource('UserDataDir'))
filename = self.get_filename(resource('UserDataDir'), create=True)
f = open(filename, 'w')
persist = dict([(k, v) for k, v in resource._items() if k in persistent])
pprint.pprint(persist, f)

View File

@ -7,7 +7,7 @@ dependencies.
Run 'python setup.py run' to start Gaphor directly (without install).
"""
VERSION = '0.10.2'
VERSION = '0.10.3'
import sys
sys.path.insert(0, '.')