~ubuntu-branches/ubuntu/utopic/pyscrabble/utopic

« back to all changes in this revision

Viewing changes to pyscrabble/db.py

  • Committer: Bazaar Package Importer
  • Author(s): Magnus Holmgren
  • Date: 2011-04-25 21:58:25 UTC
  • Revision ID: james.westby@ubuntu.com-20110425215825-wk0w127t7mgjrbjy
Tags: 1.6.2-5
* Convert package to source format 3.0 (quilt), meaning renaming the
  patches and converting their headers as well as dropping
  README.source.
* Convert to using dh_python2 (Closes: #616983).
* Run setup.py with --install-layout=deb to get filesystem layout right.
* Bump Debhelper compat level to 7.
* pyscrabble-server.README.Debian: Clarify that pyscrabble-server is not
  intended to be run from the command line directly (Closes: #611833).
* hosts.patch: Improve the code for adding new entries to the Additional
  Hosts list:
  * Fix C&P bug that caused the Game port to be validated twice but the 
    Web port not at all.  
  * Pre-fill the default port numbers to help the user (Closes: #566666).
  * Don't destroy the dialog until the entered values have been extracted.
* Increase Standards-Version to 3.9.2 without changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from pyscrabble import constants
2
 
from pyscrabble import manager
3
2
from ZODB import FileStorage, DB as _DB
4
3
import transaction
5
4
 
12
11
        '''
13
12
        Initialize the connection to the DB
14
13
        '''
15
 
        r = manager.ResourceManager()
16
 
        path = r["config"][constants.DB_LOCATION]
 
14
        import os
 
15
        from pyscrabble import dist
 
16
 
 
17
        path = os.path.join(dist.SERVER_DB_DIR, constants.DB_LOCATION)
17
18
        
18
19
        storage = FileStorage.FileStorage(path)    
19
20
        db = _DB(storage)