changeset 71:0c98d1c2c6df

fix syntax errors
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 08 Jul 2010 10:40:43 -0700
parents f6a6a4b072e7
children c9bab68d00ac
files bitsyblog/bitsyblog.py bitsyblog/blog.py bitsyblog/factory.py
diffstat 3 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/bitsyblog/bitsyblog.py	Wed Jul 07 16:18:19 2010 -0700
+++ b/bitsyblog/bitsyblog.py	Thu Jul 08 10:40:43 2010 -0700
@@ -27,6 +27,7 @@
 from genshi.builder import Markup
 from genshi.template import TemplateLoader
 from paste.fileapp import FileApp
+from pkg_resources import iter_entry_points
 from pkg_resources import resource_filename
 from StringIO import StringIO
 from urlparse import urlparse
@@ -73,7 +74,7 @@
         from user import FilespaceUsers
 
         self.users = FilespaceUsers(self.file_dir)
-        self.blog = FileBlog(self, self.file_dir)
+        self.blog = FileBlog(self.file_dir)
         self.cooker = self.restructuredText
         self.feed_items = int(self.feed_items)
 
@@ -112,7 +113,7 @@
               handler = entry_point.load()(self, **handler_args.get(entry_point.name, {}))
               self.handlers.append(handler)
           except:
-              print 'Cant load entry point %s' entry_point.name 
+              print 'Cant load entry point %s' % entry_point.name 
               continue
 
 
--- a/bitsyblog/blog.py	Wed Jul 07 16:18:19 2010 -0700
+++ b/bitsyblog/blog.py	Thu Jul 08 10:40:43 2010 -0700
@@ -79,7 +79,7 @@
 
     def post(self, user, date, text, privacy):
         """post a new blog entry"""
-        return BlogEntry(date, text, privacy, user):
+        return BlogEntry(date, text, privacy, user)
 
     def delete(self, user, datestamp):
         """remove a blog entry"""
--- a/bitsyblog/factory.py	Wed Jul 07 16:18:19 2010 -0700
+++ b/bitsyblog/factory.py	Thu Jul 08 10:40:43 2010 -0700
@@ -23,7 +23,7 @@
         if key.startswith(key_str):
             key = key.split(key_str, 1)[-1]
             if key in config:
-                bitysblog_args[key] = value
+                bitsyblog_args[key] = value
         else:
             if '.' in key:
                 section, key = key.split('.', 1)
@@ -33,7 +33,7 @@
 def factory(global_conf, **app_conf):
     """make bitsyauth app and wrap it in middleware"""
     bitsyblog_args, handler_args = get_args(app_conf)
-    app = BitsyBlog(**args)
+    app = BitsyBlog(bitsyblog_args, handler_args)
     secret = app_conf.get('secret', 'secret')
     return BitsyAuth(HTTPExceptionHandler(app), 
                      global_conf,
@@ -47,7 +47,7 @@
     """make single-user bitsyblog"""
     bitsyblog_args, handler_args = get_args(app_conf)
     user = app_conf['bitsyblog.user'] # ensure this exist
-    app = BitsierBlog(**args)
+    app = BitsierBlog(bitsyblog_args, handler_args)
     app.user = user
     secret = app_conf.get('secret', 'secret')
     auth = BitsyAuth(HTTPExceptionHandler(app),