svn keywords
[plcapi.git] / PLC / Methods / GetPlcRelease.py
index 7df66aa..9f4ca94 100644 (file)
@@ -1,3 +1,5 @@
+# $Id$
+# $URL$
 from PLC.Method import Method
 from PLC.Auth import Auth
 from PLC.Faults import *
@@ -7,7 +9,10 @@ import re
 comment_regexp = '\A\s*#.|\A\s*\Z|\Axxxxx' 
 
 regexps = { 'build'   : '\A[bB]uild\s+(?P<key>[^:]+)\s*:\s*(?P<value>.*)\Z',
-           'tags'    : '\A(?P<key>[^:]+)\s*:=\s*(?P<value>.*)\Z'}
+           'tags'    : '\A(?P<key>[^:]+)\s*:=\s*(?P<value>.*)\Z',
+# spaces not part of key : ungreedy
+            'rpms'    : '\A(?P<key>[^:]+?)\s*::\s*(?P<value>.*)\Z',
+}
 
 class GetPlcRelease(Method):
     """
@@ -34,7 +39,6 @@ class GetPlcRelease(Method):
        for field in regexps.keys():
            matchers[field] = re.compile(regexps[field])
            result[field]={}
-       result['rpms']="Not implemented yet"
 
        try:
            release = open('/etc/myplc-release')