Commits

Yury Yurevich committed fa1bc94

Move change status to separate method.

Comments (0)

Files changed (1)

         if 'status' in request.args:
             status = request.args['status'][0]
         if (username and status):
-            self.users[username] = status
+            self.change_status(username, status)
         request.setResponseCode(302)
         request.setHeader('Location', '/')
         return ''
 
+    def change_status(self, user, status):
+        self.users[username] = status
 
 if __name__ == '__main__':
     site = server.Site(Simple())