+# $Id$
+# $URL$
from PLC.Method import Method
from PLC.Auth import Auth
from PLC.Faults import *
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):
"""
for field in regexps.keys():
matchers[field] = re.compile(regexps[field])
result[field]={}
- result['rpms']="Not implemented yet"
try:
release = open('/etc/myplc-release')