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:
Barış Metin
2005-07-19 22:58:42 +00:00
parent 423216eaea
commit 9406daab70
+6
View File
@@ -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):