Modify

Ticket #1141 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

bcfg2-lint: AttributeError: 'NoneType' object has no attribute 'splitlines'

Reported by: Alexanderyt <[email protected]…> Owned by: https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
Priority: major Milestone: Bcfg2 1.3.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc:

Description

Ubuntu 12.04 Version: 1.3.0-1~testing2~precise1+e276eef

# bcfg2-lint

Django configuration problem: Please fill out the database NAME in the settings module before using the database. Traceback (most recent call last):

File "/usr/sbin/bcfg2-lint", line 207, in <module>

sys.exit(main())

File "/usr/sbin/bcfg2-lint", line 195, in main

setup=setup, files=files)

File "/usr/sbin/bcfg2-lint", line 31, in run_server_plugins

errorhandler=errorhandler, setup=setup, files=files)

File "/usr/sbin/bcfg2-lint", line 55, in run_plugin

return plugin(*args, dict(files=files, errorhandler=errorhandler)).Run()

File "/usr/lib/pymodules/python2.7/Bcfg2/Server/Lint/Comments.py", line 23, in Run

self.check_cfg()

File "/usr/lib/pymodules/python2.7/Bcfg2/Server/Lint/Comments.py", line 117, in check_cfg

self.check_plaintext(entry.name, entry.data, rtype)

File "/usr/lib/pymodules/python2.7/Bcfg2/Server/Lint/Comments.py", line 134, in check_plaintext

self.check_lines(filename, data.splitlines(), rtype)

AttributeError?: 'NoneType?' object has no attribute 'splitlines'

Attachments

Change History

comment:1 Changed 10 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Owner changed from desai to https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc
  • Status changed from new to accepted

I can't seem to replicate this; can you provide some details on a minimal replication case? Thanks.

comment:2 Changed 10 years ago by Alexanderyt <[email protected]…>

I can reproduce this issue if rename any file to <filename.genshi>. For example, please run "mv motd motd.genshi" and now "bcfg2-lint".

comment:3 Changed 10 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

My best guess is that the file you've renamed to .genshi is not a valid Genshi template, so the file cannot be parsed. If that's so, you should see "Failed to load template: <filename>" somewhere in the startup messages when you run bcfg2-lint. Can you verify if that's the case? Thanks.

comment:4 Changed 10 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Status changed from accepted to closed
  • Resolution set to fixed

Turns out I was misunderstanding the problem; fixed in https://github.com/Bcfg2/bcfg2/commit/e3f871022b9cc4bb4916c23920c6621be8c33e7d

Thanks!

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.