Bug 892798 - [PATCH] RFE: Some API to test the version of python-lvm from modules using it
Summary: [PATCH] RFE: Some API to test the version of python-lvm from modules using it
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: python-lvm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Andy Grover
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-07 21:25 UTC by James Antill
Modified: 2017-09-20 17:44 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-09-20 17:44:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Quick patch to add lvm.__version__ etc. (880 bytes, patch)
2013-01-07 21:25 UTC, James Antill
no flags Details | Diff

Description James Antill 2013-01-07 21:25:11 UTC
Created attachment 674353 [details]
Quick patch to add lvm.__version__ etc.

Description of problem:

 I'd like some way to test the version of the python-lvm module within code so that I can more easily turn features off or just not use old versions. The commonish python way to do this is to supply the module top levels:

lvm.__version__ # string of the version
lvm.__version_info__ # tuple of the version

...so this patch does that:

http://james.fedorapeople.org/patches/pylvm2-version.patch

...although it requires manually updating the code for each version change, which sucks.

Comment 1 Andy Grover 2013-01-07 23:15:04 UTC
Suggest using lvm2-python-libs pkg in rawhide, the successor to python-lvm. Version is obtainable via lvm.getVersion().


Note You need to log in before you can comment on or make changes to this bug.