Ticket #653 (closed enhancement: fixed)

Opened 14 years ago

Last modified 14 years ago

mandatory SQLAlchemy import in Snapshots/

Reported by: Torsten Rehn <[email protected]…> Owned by: desai
Priority: minor Milestone: Bcfg2 1.0.0 Release
Component: bcfg2-server Version:
Keywords: Cc:


bcfg2 etc # bcfg2-admin --help
Usage: bcfg2-admin [OPTIONS] MODE [ARGS]

Available options are:
   -C <configfile>   Set alternate bcfg2.conf location

Available modes are:
   client            Create or delete client entries
   compare           Determine differences between files or directories of client specification instances
   fingerprint       Print the server certificate fingerprint
   init              Interactively initialize a new repository
   minestruct        Extract extra entry lists from statistics
   pull              Integrate configuration information from clients into the server repository
   query             Query clients
Traceback (most recent call last):
  File "/usr/local/bin/bcfg2-admin", line 53, in <module>
    (mode, mode_import(mode).__shorthelp__)))
  File "/usr/local/bin/bcfg2-admin", line 19, in mode_import
    (modname)).Server.Admin, modname)
  File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Admin/", line 9, in <module>
    import Bcfg2.Server.Snapshots
  File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Snapshots/", line 3, in <module>
    import sqlalchemy, sqlalchemy.orm, ConfigParser
ImportError: No module named sqlalchemy

Please don't import it in init like this. If I don't care about Snapshots or any SQL stuff, I shouldn't need sqlalchemy.


Change History

comment:1 Changed 14 years ago by desai

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

This was actually a bug in bcfg2-admin; the help codepath didn't handle import errors properly (but the balance of bcfg2-admin did). Fixed in [5b415888ffc2dfd8a85f38f09fd64edd49ef5a71] (SVN r5210).

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


Add a comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.