tighten a bit of code
authorGreg Price <price@mit.edu>
Thu, 29 Oct 2009 05:36:43 +0000 (01:36 -0400)
committerGreg Price <price@mit.edu>
Thu, 29 Oct 2009 05:36:43 +0000 (01:36 -0400)
svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2708

code/main.py

index c4eff65..f0d1f53 100755 (executable)
@@ -254,8 +254,7 @@ console will suffer artifacts.
 
         def __getattr__(self, name):
             try:
 
         def __getattr__(self, name):
             try:
-                machine_id = int(name)
-                cherrypy.request.params['machine_id'] = machine_id
+                cherrypy.request.params['machine_id'] = int(name)
                 return self
             except ValueError:
                 return None
                 return self
             except ValueError:
                 return None