From 9406daab70a98e1bf5d13aac2d89b342c8fc2fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Tue, 19 Jul 2005 22:58:42 +0000 Subject: [PATCH] =?UTF-8?q?yap=C4=B1land=C4=B1rma=20se=C3=A7eneklerine=20k?= =?UTF-8?q?ey=20isimleri=20ile=20de=20ula=C5=9Fabilece=C4=9Fiz=20art=C4=B1?= =?UTF-8?q?k.=20Bu=20=C3=B6zellikle=20repos=20i=C3=A7in=20=C3=A7ok=20gerek?= =?UTF-8?q?li.=20Standart=20bir=20repo=20ad=C4=B1=20tan=C4=B1mlay=C4=B1p?= =?UTF-8?q?=20(=C3=B6rne=C4=9Fin=20=C5=9Fu=20anda=20"default")=20bunu=20ar?= =?UTF-8?q?ayabiliriz.=20Veya=20komut=20sat=C4=B1r=C4=B1ndan=20verilen=20b?= =?UTF-8?q?ir=20repos=20i=C3=A7in=20=C3=B6zel=20i=C5=9Flem=20yapabiliriz.?= =?UTF-8?q?=20Repolar=C4=B1n=20isimleri=20yap=C4=B1land=C4=B1rma=20dosyas?= =?UTF-8?q?=C4=B1ndaki=20anahtar=20isimleri=20ile=20olacak.=20Yani:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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. --- pisi/configfile.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pisi/configfile.py b/pisi/configfile.py index 1c7d89c9..8703f1d0 100644 --- a/pisi/configfile.py +++ b/pisi/configfile.py @@ -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):