Skip to content

Commit

Permalink
Merge pull request #106 from andfoy/term_creation_size_debug
Browse files Browse the repository at this point in the history
PR: Replace default values for resize arguments
  • Loading branch information
andfoy committed Aug 9, 2017
2 parents d97b0da + e6c4333 commit bc75ba9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spyder_terminal/server/rest/term_rest.py
Expand Up @@ -13,10 +13,11 @@ class MainHandler(tornado.web.RequestHandler):
@tornado.gen.coroutine
def post(self):
"""POST verb: Create a new terminal."""
rows = int(self.get_argument('rows', None, 23))
cols = int(self.get_argument('cols', None, 73))
rows = int(self.get_argument('rows', default=23))
cols = int(self.get_argument('cols', default=73))
cwd = self.get_cookie('cwd', default=getcwd())
self.application.logger.info('CWD: {0}'.format(cwd))
self.application.logger.info('Size: ({0}, {1})'.format(cols, rows))
pid = yield self.application.term_manager.create_term(rows, cols, cwd)
self.write(pid)

Expand All @@ -27,6 +28,6 @@ class ResizeHandler(tornado.web.RequestHandler):
@tornado.gen.coroutine
def post(self, pid):
"""POST verb: Resize a terminal."""
rows = int(self.get_argument('rows', None, 23))
cols = int(self.get_argument('cols', None, 73))
rows = int(self.get_argument('rows', default=23))
cols = int(self.get_argument('cols', default=73))
self.application.term_manager.resize_term(pid, rows, cols)

0 comments on commit bc75ba9

Please sign in to comment.