Ernesto Menéndez avatar Ernesto Menéndez committed 0423d84

WIP: investigando problema de error al intentar bajar archivo estatico que no existe (ws)

Comments (0)

Files changed (3)

nxweb/utils/ws/__init__.py

 def notfound(req):
     if req.matched_route is None:
         return HTTPNotFound()
-
+    print req.matched_route, req.matched_route.name # DEBUG
+    print dir(req.matched_route)
+    ##
     introspector = req.registry.introspector
     routes = introspector.get('routes', req.matched_route.name)
-
+    print routes # DEBUG
+    print dir(routes)
+    for k,v in routes.iteritems():
+        print k,v
+    ##
     views_info = {}
 
     for view_intr in introspector.related(routes):

scripts/program_create.py

 if __name__ == '__main__':
     #1+PrimerPrograma+1
     program_directory   = os.path.dirname(os.path.realpath(__file__))+"/program"
-    user_id             = "admin"
-    program_name        = "blender_test"
+    user_id             = "user1"
+    #program_name        = "blender_test"
+    program_name        = "program1"
     program_version     = "1.0"
     runner_name         = "python2"
-    runner_arguments    = {"main_script"  : "blender_test.py"}
+    #runner_arguments    = {"main_script"  : "blender_test.py"}
+    runner_arguments    = {"main_script"  : "programa.py"}
     basedir = program_directory
-    archivename = "blender_test.zip"
+    #archivename = "blender_test.zip"
+    archivename = "program1.zip"
     print os.path.dirname(os.path.realpath(__file__))+"/program"
     #exit()
     zipdir(basedir, archivename)
-    f = open("blender_test.zip")
+    f = open(archivename)
 
     dkvs.initialize(host=None, port=8098)
 #(user_key, program_name, program_version, runner_name, runner_arguments, binary_data):

scripts/pubkey_create.py

 
 
 userid = raw_input('userid: ')
+name = raw_input('key name: ')
 privkey_filename = raw_input('private key `pem` file (leave empty to generate one): ')
 
 if (len(userid) == 0):
     with open(privkey_filename, 'r') as pk_file:
         key = rsa.Key.import_key(pk_file.read())
 
-#create(userid, key.key_id(), key.export_public_key())
+create(userid, name, key.key_id(), key.export_public_key())
 print key.export_public_key()
 print key.export_key()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.