@@ -19,6 +19,9 @@ class BaseSet:
1919 @ivar description: Description of Base Set
2020 @type description: C{str}
2121
22+ @ivar url: URL of Base Set
23+ @type url: C{str}
24+
2225 @ivar files: Files included in Base Set, with their md5sum
2326 @type files: C{dict}
2427 """
@@ -30,6 +33,7 @@ def __init__(self):
3033 self .unique_id = None
3134 self .version = None
3235 self .description = None
36+ self .url = None
3337 self .files = None
3438
3539 def read (self , fp ):
@@ -63,9 +67,12 @@ def read(self, fp):
6367 # Check entries we expected but are not there
6468 for key , key_type in keys .items ():
6569 if not ini_parser .has_option (section , key ):
70+ if key_type == str | None :
71+ continue
6672 raise ValidationException (f"Option { section } :{ key } is missing." )
73+
6774 value = ini_parser .get (section , key )
68- if not isinstance (value , key_type ):
75+ if not isinstance (value , str if key_type == str | None else key_type ):
6976 raise ValidationException (f"Option { section } :{ key } is not a { key_type } ." )
7077
7178 # List the files, their md5sum, and the complete md5sum
@@ -95,5 +102,6 @@ def read(self, fp):
95102 self .unique_id = ini_parser .get ("metadata" , "shortname" ).encode ()
96103 self .version = ini_parser .get ("metadata" , "version" )
97104 self .description = ini_parser .get ("metadata" , "description" )
105+ self .url = ini_parser .get ("metadata" , "url" , fallback = None )
98106 self .files = files
99107 self .md5sum = md5sum
0 commit comments