acadavid / WinLibre

WinLibre Repository Development

Clone this repository (size: 2.0 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/acadavid/winlibre/
commit 52: 5e37036c4bb4
parent 51: 8eec570ff5de
branch: default
Moved NAMESPACE to top Removed __str__ function so that class returns a list. List should be printed using ','.join(list) if needing to print to console. Maybe we can work around this?
Chris Oliver / excid3
9 months ago

Changed (Δ7 bytes):

raw changeset »

wpkg/package.py (3 lines added, 4 lines removed)

Up to file-list wpkg/package.py:

@@ -17,6 +17,7 @@ print e.to_string()
17
17
18
18
INFO_FILENAME = 'info.xml'
19
19
PACKAGES_FILENAME = 'packages.xml'
20
NAMESPACE='' #Empty NameSpace just to trick python-elements and avoid warning because NameSpace is None
20
21
21
22
#########################
22
23
# Lists/Helper classes
@@ -27,8 +28,6 @@ class Writeable(Element):
27
28
        f.write(self.to_string())
28
29
        f.close()
29
30
30
NAMESPACE='' #Empty NameSpace just to trick python-elements and avoid warning because NameSpace is None
31
        
32
31
class List(UserList, Element):
33
32
    _tag = ''
34
33
    _namespace = NAMESPACE
@@ -39,8 +38,8 @@ class List(UserList, Element):
39
38
        self.data = isinstance(datas, list) and data or []
40
39
        self._text = None
41
40
        
42
    def __str__(self):
43
        return ' '.join(self.data)
41
    #def __str__(self):
42
    #   return ', '.join(self.data)
44
43
45
44
class Supported(List):
46
45
    _tag = 'supported'