diff options
| author | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-05 00:51:58 -0500 |
|---|---|---|
| committer | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-05 00:51:58 -0500 |
| commit | 6de41224c5133ced1124521ea0b212d1f6f2c2c4 (patch) | |
| tree | a8c9f95d158c81d19a4f0aa7bce32beda2d511bb /modules | |
| parent | 30fe0400ab1bb17b892235ae96c5e704204d4fc2 (diff) | |
| download | fedora-devshell-6de41224c5133ced1124521ea0b212d1f6f2c2c4.tar.gz fedora-devshell-6de41224c5133ced1124521ea0b212d1f6f2c2c4.tar.xz fedora-devshell-6de41224c5133ced1124521ea0b212d1f6f2c2c4.zip | |
Adds headers and footers to log files
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/cabal.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/cabal.py b/modules/cabal.py index cc82db7..db5a636 100644 --- a/modules/cabal.py +++ b/modules/cabal.py @@ -29,7 +29,7 @@ from urllib import urlopen, urlretrieve from base.base import log from base.module import Module from base.exceptions import ExecutionException -from base.util import pwd, one +from base.util import pwd, one, log_file from base.vars import orig_src_dir, haskell_compiler from modules.dirfactory import DirFactory @@ -59,7 +59,7 @@ class Cabal(Module): def compile_setup(self, orig=''): log.debug('code_dir is ' + self.package.code_dir) with pwd(self.package.code_dir): - with file('ghc.log', 'a') as ghc_out: + with log_file('ghc.log') as ghc_out: log.debug('ghc.log file is ' + str(ghc_out)) log.debug('source_dir is ' + self.package.source_dir(orig)) with pwd(self.package.source_dir(orig)): @@ -73,7 +73,7 @@ class Cabal(Module): user = True if target == 'home' else False self.compile_setup(orig) with pwd(self.package.code_dir): - with file('cabal.log', 'a') as cabal_out: + with log_file('cabal.log') as cabal_out: log.debug('source_dir is ' + self.package.source_dir(orig)) with pwd(self.package.source_dir(orig)): args = [abspath('Setup'), 'configure'] + \ @@ -86,7 +86,7 @@ class Cabal(Module): '''This is not safe to run on an unconfigured source dir''' self.compile_setup(orig) with pwd(self.package.code_dir): - with file('cabal.log', 'a') as cabal_out: + with log_file('cabal.log') as cabal_out: with pwd(self.package.source_dir(orig)): args = [abspath('Setup'), 'build'] p = Popen(args, stdout=cabal_out, stderr=cabal_out) @@ -97,7 +97,7 @@ class Cabal(Module): '''This is not safe to run on an unconfigured source dir''' self.compile_setup(orig) with pwd(self.package.code_dir): - with file('cabal.log', 'a') as cabal_out: + with log_file('cabal.log') as cabal_out: with pwd(self.package.source_dir(orig)): args = [abspath('Setup'), 'install'] p = Popen(args, stdout=cabal_out, stderr=cabal_out) |
