Skip to content
This repository

Removed unnecessary import #497

Closed
wants to merge 1 commit into from

2 participants

Matt Rasmus Max Goodman
Matt Rasmus
mttr commented

Calling 'import pylon.config' (which is not an actual module) was breaking the build process...

Matt Rasmus Removed 'import pylons.config', since it was unnecessary and broke th…
…e 'make pyx' process (since pylons.config isn't an actual module...)
784abd0
Max Goodman
Owner

pylons.config is definitely an actual importable python object and is used in several places in this file. It sounds like something else is amiss with your build environment. If you'd like help figuring it out, please send a description of the error to our mailing list or dev IRC channel.

Max Goodman chromakode closed this
Matt Rasmus
mttr commented

According to the documentation for Pylons, pylons.config is a global object contained within the pylons module--in which case, the proper way to import it is with from pylons import config. But even that's not necessary since pylons is already imported in that file, and can be referenced by using pylons.config (which it already is).

Max Goodman
Owner

Gotcha. You are correct that the import can be pruned. Reopening.

Max Goodman chromakode reopened this
Max Goodman
Owner

Merged, thank you! :)

312da0e

Max Goodman chromakode closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 16, 2012
Matt Rasmus Removed 'import pylons.config', since it was unnecessary and broke th…
…e 'make pyx' process (since pylons.config isn't an actual module...)
784abd0
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 0 additions and 1 deletion. Show diff stats Hide diff stats

  1. 1  r2/r2/lib/translation.py
1  r2/r2/lib/translation.py
@@ -23,7 +23,6 @@
23 23
 import json
24 24
 import os
25 25
 import pylons
26  
-import pylons.config
27 26
 from pylons.i18n.translation import translation, LanguageError, NullTranslations
28 27
 
29 28
 try:
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.