Modify ↓
Ticket #653 (closed enhancement: fixed)
mandatory SQLAlchemy import in Snapshots/__init__.py
Reported by: | Torsten Rehn <[email protected]…> | 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
Note: See
TracTickets for help on using
tickets.
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).