* actions -> actions.py
* kod içerisinde sihirli sabitler kullanmak yerine context.Constants'ı güncelemek gerekir. * bir takım indent hatası giderildi
This commit is contained in:
+2
-1
@@ -49,7 +49,8 @@ class PisiBuild:
|
|||||||
self.applyPatches()
|
self.applyPatches()
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.actionScript = open(os.path.dirname(self.ctx.pspecfile ) + '/' + 'actions').read()
|
specdir = os.path.dirname(self.ctx.pspecfile)
|
||||||
|
self.actionScript = open("/".join([specdir,self.ctx.const.actions_file])).read()
|
||||||
except IOError, e:
|
except IOError, e:
|
||||||
ui.error ("Action Script: %s\n" % e)
|
ui.error ("Action Script: %s\n" % e)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -34,6 +34,10 @@ class Constants:
|
|||||||
self.c.build_work_dir_suffix = "/work"
|
self.c.build_work_dir_suffix = "/work"
|
||||||
self.c.build_install_dir_suffix = "/install"
|
self.c.build_install_dir_suffix = "/install"
|
||||||
|
|
||||||
|
# file/directory names
|
||||||
|
self.c.actions_file = "actions.py"
|
||||||
|
self.c.files_dir = "files"
|
||||||
|
|
||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self.c, attr)
|
return getattr(self.c, attr)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user