Merge branch 'feature/RemoveWarningOutputSrc' into develop

This commit is contained in:
JackDandy 2014-11-15 04:30:43 +00:00
commit 86cd20737b
2 changed files with 7 additions and 0 deletions

View file

@ -4,6 +4,7 @@
* Remove redundant references from Config / Help & Info * Remove redundant references from Config / Help & Info
* Fix poster preview on small poster layout * Fix poster preview on small poster layout
* Change overhaul Config Anime to be in line with General Configuration * Change overhaul Config Anime to be in line with General Configuration
* Remove output of source code line when warnings highlight libraries not used with IMDb
### 0.3.0 (2014-11-12 14:30:00 UTC) ### 0.3.0 (2014-11-12 14:30:00 UTC)

View file

@ -441,6 +441,12 @@ class DOMParserBase(object):
self._useModule = useModule self._useModule = useModule
nrMods = len(useModule) nrMods = len(useModule)
_gotError = False _gotError = False
# Force warnings.warn() to omit the source code line in the message
formatwarning_orig = warnings.formatwarning
warnings.formatwarning = lambda message, category, filename, lineno, line=None: \
formatwarning_orig(message, category, filename, lineno, line='')
for idx, mod in enumerate(useModule): for idx, mod in enumerate(useModule):
mod = mod.strip().lower() mod = mod.strip().lower()
try: try: