diff options
| author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-20 16:44:02 -0400 |
|---|---|---|
| committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-09-20 16:44:02 -0400 |
| commit | 7d7c0f4dc299dc342c53341f61ae4643eb134213 (patch) | |
| tree | ea19339dfa80c85f463efda6e74e49eaf5c37c7c /server/yaml/inline.py | |
| parent | 4599345e5814563de497d95829c26c6758f29b1a (diff) | |
Remove yaml libraries (configparser is good enough) plus remove references to virt-factory.
Diffstat (limited to 'server/yaml/inline.py')
| -rwxr-xr-x | server/yaml/inline.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/server/yaml/inline.py b/server/yaml/inline.py deleted file mode 100755 index 8e647de..0000000 --- a/server/yaml/inline.py +++ /dev/null @@ -1,38 +0,0 @@ -import re
-import string
-
-class InlineTokenizer:
- def __init__(self, data):
- self.data = data
-
- def punctuation(self):
- puncts = [ '[', ']', '{', '}' ]
- for punct in puncts:
- if self.data[0] == punct:
- self.data = self.data[1:]
- return punct
-
- def up_to_comma(self):
- match = re.match('(.*?)\s*, (.*)', self.data)
- if match:
- self.data = match.groups()[1]
- return match.groups()[0]
-
- def up_to_end_brace(self):
- match = re.match('(.*?)(\s*[\]}].*)', self.data)
- if match:
- self.data = match.groups()[1]
- return match.groups()[0]
-
- def next(self):
- self.data = string.strip(self.data)
- productions = [
- self.punctuation,
- self.up_to_comma,
- self.up_to_end_brace
- ]
- for production in productions:
- token = production()
- if token:
- return token
-
|
