Function typo

9 views
Skip to first unread message

John Donovan

unread,
Feb 11, 2013, 8:14:49 AM2/11/13
to pr...@googlegroups.com
Hi,
I'm using version 0.6.0, and I've found a typo in more/debian/package/pip.py, around line 230, ensure_requeriments_installed() should be ensure_requirements_installed() I've added a fix for it locally without breaking backwards compatibility:

    def ensure_requeriments_installed(self, requeriments_file_name):
        '''
        Fix typo without breaking backwards compatibility.
        '''
        self.log('"ensure_requeriments_installed" is deprecated, please use "ensure_requirements_installed" instead.')
        self.ensure_requirements_installed(requeriments_file_name)

    def ensure_requirements_installed(self, requirements_file_name):
        '''
        Makes sure the requirements file provided is installed.
        <em>Parameters</em>
        requeriments_file_name - Path to the requirements file (can be provided as absolute path or relative to the directory where provy is run from).
        <em>Sample usage</em>
        <pre class="sh_python">
        from provy.core import Role
        from provy.more.debian import PipRole

        class MySampleRole(Role):
            def provision(self):
                with self.using(PipRole) as role:
                    role.ensure_requirements_installed('/path/to/requirements.txt')
        </pre>
        '''

        with open(requirements_file_name, 'r') as requirements_file:
            for requirement in requirements_file.readlines():
                self.ensure_package_installed(requirement.strip())

Regards,
John

Diogo Baeder

unread,
Feb 12, 2013, 10:17:15 PM2/12/13
to pr...@googlegroups.com
Nice catch!

Can you send us a pull request with the changes, so that we can keep this change more manageable? https://github.com/python-provy/provy

Cheers!

__________________________
Diogo Baeder
http://diogobaeder.com.br


--
You received this message because you are subscribed to the Google Groups "provy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to provy+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

John Donovan

unread,
Feb 13, 2013, 12:31:56 PM2/13/13
to pr...@googlegroups.com
Done!

-John
Reply all
Reply to author
Forward
0 new messages