summaryrefslogtreecommitdiff
path: root/giscanner/maintransformer.py
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-07-25 17:22:21 +0200
committerDieter Verfaillie <dieterv@optionexplicit.be>2013-10-08 20:55:43 +0200
commit839e4f10a6b291a261c200484ff05ec44a31d93e (patch)
tree5f4751874fd3f8c98d7dc3ae8d04e4d7e3a20a66 /giscanner/maintransformer.py
parent1fdb3fc24bec54ccaef132c415d365db4cbd16d9 (diff)
downloadgobject-introspection-839e4f10a6b291a261c200484ff05ec44a31d93e.tar.gz
giscanner: extract tag values
Diffstat (limited to 'giscanner/maintransformer.py')
-rw-r--r--giscanner/maintransformer.py26
1 files changed, 8 insertions, 18 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index 6ffec2fb..af9a0a1b 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -595,30 +595,20 @@ class MainTransformer(object):
since_tag = block.tags.get(TAG_SINCE)
if since_tag is not None:
- node.version = since_tag.value
+ if since_tag.value:
+ node.version = since_tag.value
deprecated_tag = block.tags.get(TAG_DEPRECATED)
if deprecated_tag is not None:
- value = deprecated_tag.value
- if ': ' in value:
- delimiter = value.find(': ')
- version = value[:delimiter]
- desc = value[delimiter + 2:]
- else:
- desc = value
- version = None
- node.deprecated = desc
- if version is not None:
- node.deprecated_version = version
+ if deprecated_tag.value:
+ node.deprecated_version = deprecated_tag.value
+ if deprecated_tag.description:
+ node.deprecated = deprecated_tag.description
stability_tag = block.tags.get(TAG_STABILITY)
if stability_tag is not None:
- stability = stability_tag.value.capitalize()
- if stability in ["Stable", "Unstable", "Private", "Internal"]:
- node.stability = stability
- else:
- message.warn('unknown value "%s" for Stability tag' % (
- stability_tag.value), stability_tag.position)
+ if stability_tag.value:
+ node.stability = stability_tag.value
annos_tag = block.tags.get(TAG_ATTRIBUTES)
if annos_tag is not None: