Merge lp:~numerigraphe/openerp-tools/runbot-missing-run-directory into lp:openerp-tools

Proposed by Numérigraphe
Status: Rejected
Rejected by: Vo Minh Thu
Proposed branch: lp:~numerigraphe/openerp-tools/runbot-missing-run-directory
Merge into: lp:openerp-tools
Diff against target: 8 lines (+2/-0)
1 file modified
.bzrignore (+2/-0)
To merge this branch: bzr merge lp:~numerigraphe/openerp-tools/runbot-missing-run-directory
Reviewer Review Type Date Requested Status
OpenERP R&D Team Pending
Review via email: mp+148125@code.launchpad.net

Description of the change

When starting the runbot for the first time, I met the error below simply because the directory "run" does not exist in the branch.
I propose to add it to the branch and ignore its contents.
Lionel Sausin.

Traceback (most recent call last):
  File "./openerp-runbot", line 10, in <module>
    import openerprunbot
  File "/home/ls/Sources/openerp/openerp-tools/openerp-runbot/openerprunbot/__init__.py", line 7, in <module>
    from . import core
  File "/home/ls/Sources/openerp/openerp-tools/openerp-runbot/openerprunbot/core.py", line 19, in <module>
    from openerprunbot.misc import *
  File "/home/ls/Sources/openerp/openerp-tools/openerp-runbot/openerprunbot/misc.py", line 23, in <module>
    _log_handler = logging.handlers.TimedRotatingFileHandler('run/runbot.log', 'D', 1, 30)
  File "/usr/lib/python2.7/logging/handlers.py", line 171, in __init__
    BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 65, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 897, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 916, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: '/home/ls/Sources/openerp/openerp-tools/openerp-runbot/run/runbot.log'

To post a comment you must log in.
Revision history for this message
Vo Minh Thu (thu) wrote :

Hi,

Thanks for the patch, I'm glad there is some interest in the runbot :)

But I don't like your patch: there is an `init` command to create the directory structure. Maybe it is not complete and the 'run' directory is not created, so it would need to be added there.

Furthermore executing the runbot is not necessarily done from its source directory, so the added 'run' directory would be of little help in that case.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Le 13/02/2013 11:42, Vo Minh Thu (OpenERP) a écrit :
> (...)there is an `init` command to create the directory structure. Maybe it is not complete and the 'run' directory is not created, so it would need to be added there.
Well no, you can't do it in --init precisely because --init does not
work when the "run" directory is missing...
Anyway I'll report this as a bug and let you fix it the way you chose.
Thanks for your care.
Lionel.

Unmerged revisions

241. By Numerigraphe - Lionel Sausin <email address hidden>

[FIX] Create the directory openerp-runbot/run, otherwise you get an error message when starting runbot.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file '.bzrignore'
2--- .bzrignore 1970-01-01 00:00:00 +0000
3+++ .bzrignore 2013-02-13 10:00:31 +0000
4@@ -0,0 +1,2 @@
5+openerp-runbot/run/*
6+
7
8=== added directory 'openerp-runbot/run'