* fix: true'yla false karismis zaten oh oh
* option almak icin bir yardimci rutin
This commit is contained in:
+1
-6
@@ -46,12 +46,7 @@ def init(database = True, options = None, ui = None ):
|
|||||||
import pisi.config
|
import pisi.config
|
||||||
ctx.config = pisi.config.Config(options)
|
ctx.config = pisi.config.Config(options)
|
||||||
|
|
||||||
init_comar = False
|
if not ctx.config.get_option('ignore_comar'):
|
||||||
if ctx.config.options:
|
|
||||||
if hasattr(ctx.config.options, 'ignore_comar'):
|
|
||||||
if ctx.config.options.ignore_comar:
|
|
||||||
init_comar = True
|
|
||||||
if init_comar:
|
|
||||||
# FIXME: just try for others (that don't use comar)
|
# FIXME: just try for others (that don't use comar)
|
||||||
try:
|
try:
|
||||||
import comar
|
import comar
|
||||||
|
|||||||
@@ -28,6 +28,12 @@ class Config(object):
|
|||||||
self.values = ConfigurationFile("/etc/pisi/pisi.conf")
|
self.values = ConfigurationFile("/etc/pisi/pisi.conf")
|
||||||
self.destdir = self.values.general.destinationdirectory
|
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
|
# directory accessor functions
|
||||||
# here is how it goes
|
# here is how it goes
|
||||||
# x_dir: system wide directory for storing info type x
|
# x_dir: system wide directory for storing info type x
|
||||||
|
|||||||
Reference in New Issue
Block a user