Created
October 18, 2013 17:30
-
-
Save psftw/7044973 to your computer and use it in GitHub Desktop.
ansible apt_repository info on Mint 14 and 15
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ python | |
Python 2.7.4 (default, Sep 26 2013, 03:20:26) | |
[GCC 4.7.3] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from aptsources import distro | |
>>> d = distro.get_distro() | |
>>> d.description | |
u'Linux Mint 15 Olivia' | |
>>> isinstance(d, distro.DebianDistribution) | |
False | |
>>> isinstance(d, distro.UbuntuDistribution) | |
False | |
>>> dir(d) | |
['__class__', '__delattr__', '__dict__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_enable_component', '_get_mirror_name', 'add_source', 'binary_type', 'change_server', 'codename', 'description', 'disable_component', 'enable_component', 'get_mirrors', 'get_server_list', 'get_sources', 'id', 'is_codename', 'release', 'source_type'] | |
>>> d.source_type | |
'deb-src' | |
>>> | |
$ python | |
Python 2.7.3 (default, Sep 26 2013, 16:35:25) | |
[GCC 4.7.2] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from aptsources import distro | |
>>> d = distro.get_distro() | |
>>> d.description | |
u'Linux Mint 14 Nadia' | |
>>> isinstance(d, distro.DebianDistribution) | |
False | |
>>> isinstance(d, distro.UbuntuDistribution) | |
False | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment