Mercurial > mozilla > hg > talosnames
comparison talosnames/api.py @ 1:a10ae1ea8325
WIP
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 08 Jul 2012 10:09:51 -0700 |
parents | 3e1f069ac608 |
children | c98f2a383595 |
comparison
equal
deleted
inserted
replaced
0:3e1f069ac608 | 1:a10ae1ea8325 |
---|---|
1 import sqlite3 | |
2 import urllib2 | |
3 | |
1 class TalosNames(object): | 4 class TalosNames(object): |
2 graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql' | 5 graphserver_sql = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/data.sql' |
3 | 6 schema = 'http://hg.mozilla.org/graphs/raw-file/tip/sql/schema.sql' |
7 | |
8 tables = ['os_list', | |
9 'branches', | |
10 'machines', | |
11 'pagesets', | |
12 'tests'] | |
13 | |
4 def __init__(self): | 14 def __init__(self): |
5 import pdb; pdb.set_trace() | 15 self.db = sqlite3.connect(':memory:') |
16 for table in self.tables: | |
17 pass | |
18 schema = urllib2.urlopen(self.schema).read() | |
19 cursor = self.db.cursor() | |
20 cursor.executescript(schema) | |
21 |