MetricsGrimoire/CVSAnalY — pull request #43 by andygrunwald (2013-07-20 08:53:33+00:00)
Title: Added MessageWords as a dependency for MessageWordsPrint

It is not possible to execute the extension `MessageWordsPrint` stand alone at the moment.
If i try this for cvsanaly i get the error:

```
./cvsanaly2 --extensions 'MessageWordsPrint' -u root -d cvstest .

Parsing log for . (git)
Warning: Detected empty branch 'resolve-extension-dependencies', it'll be ignored
Warning: Detected empty branch 'analysis', it'll be ignored
Warning: Detected empty branch 'help-list-extensions', it'll be ignored
Warning: Detected empty branch 'master', it'll be ignored
Warning: Detected empty branch 'extension-message-words-commit', it'll be ignored
Warning: Detected empty branch 'metrics-evo-dependency', it'll be ignored
Warning: Detected empty branch 'invalid-extension-weeks', it'll be ignored
Warning: Detected empty branch 'unnecessary-imports', it'll be ignored
Warning: Detected empty branch 'local_branches_no_results', it'll be ignored
Warning: Detected empty branch 'markdown-readme', it'll be ignored
Warning: Detected empty branch 'ignore-config', it'll be ignored
Warning: Detected empty branch 'patch-1', it'll be ignored
Warning: Detected empty branch 'libresoft-utils', it'll be ignored
Executing extensions
Executing extension MessageWordsPrint
Traceback (most recent call last):
File "./cvsanaly2", line 37, in
retval = pycvsanaly2.main.main (sys.argv[1:])
File "/Users/andygrunwald/Development/CVSAnalY/pycvsanaly2/main.py", line 344, in main
emg.run_extensions (repo, path or uri, db)
File "/Users/andygrunwald/Development/CVSAnalY/pycvsanaly2/ExtensionsManager.py", line 102, in run_extensions
self.run_extension (name, extension, repo, uri, db)
File "/Users/andygrunwald/Development/CVSAnalY/pycvsanaly2/ExtensionsManager.py", line 63, in run_extension
extension.run (repo, uri, db)
File "/Users/andygrunwald/Development/CVSAnalY/pycvsanaly2/extensions/MessageWordsPrint.py", line 97, in run
cursor.execute ("SELECT MIN(date) FROM words_freq")
File "/Library/Python/2.7/site-packages/MySQLdb/cursors.py", line 201, in execute
self.errorhandler(self, exc, value)
File "/Library/Python/2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1146, "Table 'cvstest.words_freq' doesn't exist")
```

As you see `MessageWordsPrint` try to access the database table `words_freq`. This table is created in `MessageWords`.

The solution is simple: Add the extension `MessageWords` as a dependency of `MessageWordsPrint`.