~ubuntu-branches/ubuntu/precise/gozerbot/precise

« back to all changes in this revision

Viewing changes to build/lib/gozerbot/datadir.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2008-06-02 19:26:39 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080602192639-3rn65nx4q1sgd6sy
Tags: 0.8.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# gozerbot/datadir.py
2
 
#
3
 
#
4
 
 
5
 
""" this is where the datadir lives """
6
 
 
7
 
__copyright__ = 'this file is in the public domain'
8
 
 
9
 
import os
10
 
 
11
 
datadir = 'gozerdata'
12
 
 
13
 
# old 0.4 compat shim
14
 
if os.path.isfile('data.new/config'):
15
 
    datadir = 'data.new'
16
 
elif os.path.isfile('data/config'):
17
 
    datadir = 'data'
18
 
 
19
 
def makedirs():
20
 
    """ create datadir if it nog already exists """
21
 
    if not os.path.isdir(datadir):
22
 
        os.mkdir(datadir)