What steps will reproduce the problem?
1. svn checkout http://pubsubhubbub.googlecode.com/svn/trunk/
pubsubhubbub-read-only
2. cd pubsubhubbub-read-only
3. sed -i -e 's/^\(application: \)pubsubhubbub/\1HUB_NAME/' app.yaml
4. python2.5 /usr/local/bin/appcfg.py update
5. open http://HUB_NAME.appspot.com/subscribe/
What is the expected output? What do you see instead?
The subcribe debug html page should be displayed but instead the view fails:
08-20 02:48AM 21.850 /subscribe/ 500 553ms 896cpu_ms 0kb Mozilla/5.0
(Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/531.9 (KHTML, like
Gecko) Version/4.0.3 Safari/531.9,gzip(gfe)
61.247.6.196 - - [20/Aug/2009:02:48:22 -0700] "GET /subscribe/ HTTP/1.1"
500 0 - "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us)
AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9,gzip(gfe)"
"HUB_NAME.appspot.com"
D 08-20 02:48AM 22.326
Using apiproxy.RPC
E 08-20 02:48AM 22.401
<type 'exceptions.OSError'>: [Errno 2] No such file or directory:
'/base/data/home/apps/HUB_NAME/1.335748765342620452/hooks'
Traceback (most recent call last):
File "/base/data/home/apps/HUB_NAME/1.335748765342620452/main.py", line
2473, in <module>
hooks.load()
File "/base/data/home/apps/HUB_NAME/1.335748765342620452/main.py", line
2318, in load
module_list = os.listdir(hook_directory)
What version of the product are you using? On what operating system?
pubsubhubbub-read-only revision 218, App Engine 1.2.4
Please provide any additional information below.
If you don't have any files in the hooks directory, it will get omitted
during deployment and break the application.
The following patch fixes the issue:
--- hub/main.py (revision 218)
+++ hub/main.py (working copy)
@@ -2315,6 +2315,8 @@
globals_dict = globals()
hook_directory = os.path.join(os.getcwd(), hooks_path)
+ if not os.path.exists(hook_directory):
+ return
module_list = os.listdir(hook_directory)
for module_name in sorted(module_list):
if not module_name.endswith('.py'):
Original issue reported on code.google.com by kugutsu...@gmail.com on 20 Aug 2009 at 10:13
Original issue reported on code.google.com by
kugutsu...@gmail.com
on 20 Aug 2009 at 10:13Attachments: