yapılandırma seçeneklerine key isimleri ile de ulaşabileceğiz
artık. Bu özellikle repos için çok gerekli. Standart bir repo adı tanımlayıp (örneğin şu anda "default") bunu arayabiliriz. Veya komut satırından verilen bir repos için özel işlem yapabiliriz. Repoların isimleri yapılandırma dosyasındaki anahtar isimleri ile olacak. Yani: [repos] default = http://someurl security = http://someotherurl komut satırından: pisi-cli updatedb security komutu verildiği zaman yalnızca security deposunun bilgisi güncellenebilir :). İşte apt'da olmayan bir özellik daha size :P.
This commit is contained in:
@@ -94,6 +94,12 @@ class ConfigurationSection(object):
|
||||
|
||||
return ""
|
||||
|
||||
# We'll need to access configuration keys by their names as a
|
||||
# string. Like; ["default"]...
|
||||
def __getitem__(self, key):
|
||||
return self.__getattr__(key)
|
||||
|
||||
|
||||
class ConfigurationFile(object):
|
||||
"""Parse and get configuration values from the configuration file"""
|
||||
def __init__(self, filePath):
|
||||
|
||||
Reference in New Issue
Block a user