Diff comments:

> 
> === modified file 'turnip/pack/http.py'
> --- turnip/pack/http.py       2015-06-19 06:04:02 +0000
> +++ turnip/pack/http.py       2015-11-12 00:34:44 +0000
> @@ -337,6 +337,13 @@
>          self.root = root
>  
>      def render_GET(self, request):
> +        try:
> +            from turnip.version_info import version_info
> +            request.setHeader(
> +                b'X-Turnip-Revision',
> +                version_info['revision_id'].encode('UTF-8'))
> +        except ImportError:
> +            pass

Importing inside the request isn't really ideal, and can be avoided by moving 
the import back to the top of the file and just setting version_info to None on 
ImportError.

>          request.redirect(self.root.main_site_root)
>          return b''
>  


-- 
https://code.launchpad.net/~cjwatson/turnip/revision-header/+merge/277262
Your team Launchpad code reviewers is subscribed to branch lp:turnip.

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to