Modify

Ticket #653 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

mandatory SQLAlchemy import in Snapshots/__init__.py

Reported by: Torsten Rehn <torsten.rehn@…> Owned by: desai
Priority: minor Milestone: Bcfg2 1.0.0 Release
Component: bcfg2-server Version:
Keywords: Cc:

Description

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/Snapshots.py", line 9, in <module>
    import Bcfg2.Server.Snapshots
  File "/usr/lib/python2.5/site-packages/Bcfg2/Server/Snapshots/__init__.py", 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.

Attachments

Change History

comment:1 Changed 12 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.

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.