Subversion Repositories basico

Rev

Rev 380 | Rev 384 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 380 Rev 383
Line 193... Line 193...
193
193
194
        return valid
194
        return valid
195
195
196
    def get_title(self, aid):
196
    def get_title(self, aid):
197
        ANNOTATION_FILE = LPATH['ANNOTATIONS'] + aid + '.json'
197
        ANNOTATION_FILE = LPATH['ANNOTATIONS'] + aid + '.json'
198
        with open(ANNOTATION_FILE, 'r') as fa:
-
 
199
            metadata = json.load(fa)
-
 
200
            return escape(metadata['Title'])
-
 
201
-
 
-
 
198
        try:
-
 
199
            with open(ANNOTATION_FILE, 'r') as fa:
-
 
200
                metadata = json.load(fa)
-
 
201
                return escape(metadata['Title'])
-
 
202
        except:
-
 
203
            return None
202
204
203
    def get_content_file(self, aid):
205
    def get_content_file(self, aid):
204
        return LPATH['ANNOTATIONS'] + aid + '.adoc'
206
        return LPATH['ANNOTATIONS'] + aid + '.adoc'
205
207
206
208