from pecan.deploy import deploy
app = deploy('/opt/web/draughtcraft/src/production.py')

from paste.exceptions.errormiddleware import ErrorMiddleware
app = ErrorMiddleware(
    app,
    error_email=app.conf.error_email,
    from_address=app.conf.error_email,
    smtp_server=app.conf.error_smtp_server,
    smtp_username=app.conf.error_email,
    smtp_password=app.conf.error_password,
    smtp_use_tls=True
)

from pecan import conf
from pecan.deploy import deploy
app = deploy('/opt/web/draughtcraft/src/production.py')

from paste.exceptions.errormiddleware import ErrorMiddleware
app = ErrorMiddleware(
    app,
    error_email=conf.error_email,
    from_address=conf.error_email,
    smtp_server=conf.error_smtp_server,
    smtp_username=conf.error_email,
    smtp_password=conf.error_password,
    smtp_use_tls=True
)

Fix a bug in the WSGI entrypoint.
Fix a bug in the WSGI entrypoint.

+ from pecan import conf
  from pecan.deploy import deploy
  app = deploy('/opt/web/draughtcraft/src/production.py')
  
  from paste.exceptions.errormiddleware import ErrorMiddleware
  app = ErrorMiddleware(
      app,
-     error_email=app.conf.error_email,
+     error_email=conf.error_email,
-     from_address=app.conf.error_email,
+     from_address=conf.error_email,
-     smtp_server=app.conf.error_smtp_server,
+     smtp_server=conf.error_smtp_server,
-     smtp_username=app.conf.error_email,
+     smtp_username=conf.error_email,
-     smtp_password=app.conf.error_password,
+     smtp_password=conf.error_password,
      smtp_use_tls=True
  )
  
Fix a bug in the WSGI entrypoint.
## Code Before:
from pecan.deploy import deploy
app = deploy('/opt/web/draughtcraft/src/production.py')

from paste.exceptions.errormiddleware import ErrorMiddleware
app = ErrorMiddleware(
    app,
    error_email=app.conf.error_email,
    from_address=app.conf.error_email,
    smtp_server=app.conf.error_smtp_server,
    smtp_username=app.conf.error_email,
    smtp_password=app.conf.error_password,
    smtp_use_tls=True
)

## Instruction:
Fix a bug in the WSGI entrypoint.
## Code After:
from pecan import conf
from pecan.deploy import deploy
app = deploy('/opt/web/draughtcraft/src/production.py')

from paste.exceptions.errormiddleware import ErrorMiddleware
app = ErrorMiddleware(
    app,
    error_email=conf.error_email,
    from_address=conf.error_email,
    smtp_server=conf.error_smtp_server,
    smtp_username=conf.error_email,
    smtp_password=conf.error_password,
    smtp_use_tls=True
)
