* fix: true'yla false karismis zaten oh oh

* option almak icin bir yardimci rutin
This commit is contained in:
Eray Özkural
2005-09-29 17:53:28 +00:00
parent 5a4fd8a058
commit 4d88db19c5
2 changed files with 7 additions and 6 deletions
+1 -6
View File
@@ -46,12 +46,7 @@ def init(database = True, options = None, ui = None ):
import pisi.config
ctx.config = pisi.config.Config(options)
init_comar = False
if ctx.config.options:
if hasattr(ctx.config.options, 'ignore_comar'):
if ctx.config.options.ignore_comar:
init_comar = True
if init_comar:
if not ctx.config.get_option('ignore_comar'):
# FIXME: just try for others (that don't use comar)
try:
import comar
+6
View File
@@ -28,6 +28,12 @@ class Config(object):
self.values = ConfigurationFile("/etc/pisi/pisi.conf")
self.destdir = self.values.general.destinationdirectory
def get_option(self, opt):
if self.options:
if hasattr(self.options, opt):
return getattr(self.options, opt)
return None
# directory accessor functions
# here is how it goes
# x_dir: system wide directory for storing info type x