~mhall119/+junk/api-website

« back to all changes in this revision

Viewing changes to api/storage.py

  • Committer: Michael Hall
  • Date: 2012-08-31 15:20:59 UTC
  • Revision ID: mhall119@ubuntu.com-20120831152059-rsczy11h96ryyevd
Add local GIR files

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
from django.db   import IntegrityError
6
6
import os
7
7
 
8
 
GIR_PATH="/usr/share/gir-1.0/%s.gir"
 
8
GIR_PATH=os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'girs'))
9
9
 
10
10
def _store_props(db_obj, ast_obj, ast_classes):
11
11
        """ Utility to map storage and ast properties """
30
30
 
31
31
        return db_member
32
32
 
33
 
def _store_type(node):
 
33
def _store_type(node, namespace=None):
34
34
        if node is None:
35
35
                return None
36
36
        if isinstance(node, ast.TypeUnknown):
52
52
                model = models.Type
53
53
                props = (ast.Type,)
54
54
        
 
55
        if hasattr(node, 'ctype') and node.ctype and node.ctype.startswith('Dee'):
 
56
                import pdb; pdb.set_trace()
55
57
        try:
56
58
                typedef = {'ctype': node.ctype}
57
59
                if isinstance (node, ast.Array) and model == models.Array: