~ubuntu-branches/ubuntu/utopic/gozerbot/utopic

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Jeremy Malcolm
  • Date: 2012-04-03 21:58:28 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120403215828-6mik0tzug5na93la
Tags: 0.99.1-2
* Removes logfiles on purge (Closes: #668767)
* Reverted location of installed files back to /usr/lib/gozerbot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# gozerbot/users.py
 
2
#
 
3
#
 
4
 
 
5
from gozerbot.config import config
 
6
 
 
7
if config.get('db_driver') == "olddb":
 
8
    try:
 
9
        import gozerbot.database.db
 
10
        import gozerbot.dbusers
 
11
    except Exception, ex:
 
12
        handle_exception()
 
13
        rlog(100, 'users', 'an error has occured while trying to enable the mysql database')
 
14
        die()
 
15
    users = gozerbot.dbusers.Dbusers()
 
16
else:
 
17
    import gozerbot.sausers as sa
 
18
    users = sa.DbUsers()